/**
 *
 */
import OpenApi;
import OpenApi.OpenApiUtil;

extends OpenApi;


init(config: OpenApiUtil.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('csas', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!$isNull(endpoint)) {
    return endpoint;
  }
  
  if (!$isNull(endpointMap) && !$isNull(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AuthReportInterval {
  timeUnit?: string(name='TimeUnit'),
  value?: long(name='Value'),
}

model DisposalContent {
  alertContent?: string(name='AlertContent', nullable=true),
  alertContentEn?: string(name='AlertContentEn'),
  alertTitle?: string(name='AlertTitle', nullable=true),
  alertTitleEn?: string(name='AlertTitleEn'),
  noticeContent?: string(name='NoticeContent'),
  noticeContentEn?: string(name='NoticeContentEn'),
  notifyActions?: [ string ](name='NotifyActions', description='This parameter is required.', nullable=true),
  prohibitActions?: [ string ](name='ProhibitActions'),
}

model PAL7Config {
  bypassConfig?: {
    appBypassFroms?: [ string ](name='AppBypassFroms'),
    mode?: string(name='Mode'),
    urlBypassRules?: [ 
      {
        froms?: [ string ](name='Froms'),
        paths?: [ string ](name='Paths'),
      }
    ](name='UrlBypassRules'),
  }(name='BypassConfig'),
  certId?: string(name='CertId'),
  dnsConfig?: {
    dnsServers?: [ string ](name='DnsServers'),
  }(name='DnsConfig'),
  jsHookConfig?: {
    mode?: string(name='Mode'),
    replaceRules?: [
      PAL7ConfigReplaceRule
    ](name='ReplaceRules'),
  }(name='JsHookConfig'),
  proxyDomainTypes?: bytes(name='ProxyDomainTypes', example='逗号分隔的枚举值：automatic,custom'),
  requestHeaderRewriteConfig?: {
    ops?: [
      PAL7ConfigRewriteOp
    ](name='Ops'),
  }(name='RequestHeaderRewriteConfig'),
  requestQueryRewriteConfig?: {
    ops?: [
      PAL7ConfigRewriteOp
    ](name='Ops'),
  }(name='RequestQueryRewriteConfig'),
  responseHeaderRewriteConfig?: {
    ops?: [
      PAL7ConfigRewriteOp
    ](name='Ops'),
  }(name='ResponseHeaderRewriteConfig'),
  responseRewriteConfig?: {
    mode?: string(name='Mode'),
    replaceRules?: [
      PAL7ConfigReplaceRule
    ](name='ReplaceRules'),
  }(name='ResponseRewriteConfig'),
}

model PAL7ConfigReplaceRule {
  from?: string(name='From', example='aaa'),
  to?: string(name='To', example='bbb'),
}

model PAL7ConfigRewriteOp {
  key?: string(name='Key'),
  oldValue?: string(name='OldValue'),
  op?: string(name='Op', example='add,set,delete,replace'),
  value?: string(name='Value'),
  valueVariable?: string(name='ValueVariable'),
}

model RecoveryContent {
  authReportInterval?: AuthReportInterval(name='AuthReportInterval'),
  recoveryActions?: [ string ](name='RecoveryActions', description='This parameter is required.'),
}

model Rule {
  combinator?: string(name='Combinator', nullable=true),
  id?: string(name='Id'),
  name?: string(name='Name', nullable=true),
  operator?: string(name='Operator', nullable=true),
  ruleSubType?: string(name='RuleSubType', nullable=true),
  ruleType?: string(name='RuleType', nullable=true),
  rules?: [
    Rule
  ](name='Rules'),
  values?: [ string ](name='Values'),
}

model UserCertificate {
  certId?: string(name='CertId', example='cert-aabbccdd'),
  certificate?: string(name='Certificate', example='用于测试'),
  description?: string(name='Description', example='xxxx'),
  dnsNames?: [ string ](name='DnsNames'),
  expTimeUnix?: long(name='ExpTimeUnix', example='1734492686'),
  gmtCreateUnix?: long(name='GmtCreateUnix', example='1734523812'),
  gmtModifiedUnix?: long(name='GmtModifiedUnix', example='1734523812'),
  name?: string(name='Name', example='证书1'),
  privateKey?: string(name='PrivateKey', example='xxxx'),
}

model AttachApplication2ConnectorRequest {
  applicationIds?: [ string ](name='ApplicationIds', description='This parameter is required.'),
  connectorId?: string(name='ConnectorId', description='ConnectorID。

This parameter is required.', example='connector-94db94e06b98****'),
}

model AttachApplication2ConnectorShrinkRequest {
  applicationIdsShrink?: string(name='ApplicationIds', description='This parameter is required.'),
  connectorId?: string(name='ConnectorId', description='ConnectorID。

This parameter is required.', example='connector-94db94e06b98****'),
}

model AttachApplication2ConnectorResponseBody = {
  requestId?: string(name='RequestId', example='7E9D7ACD-53D5-56EF-A913-79D148D06299'),
}

model AttachApplication2ConnectorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachApplication2ConnectorResponseBody(name='body'),
}

/**
 * @summary 挂载connector的应用
 *
 * @param tmpReq AttachApplication2ConnectorRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachApplication2ConnectorResponse
 */
async function attachApplication2ConnectorWithOptions(tmpReq: AttachApplication2ConnectorRequest, runtime: $RuntimeOptions): AttachApplication2ConnectorResponse {
  tmpReq.validate();
  var request = new AttachApplication2ConnectorShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.applicationIds)) {
    request.applicationIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.applicationIds, 'ApplicationIds', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.applicationIdsShrink)) {
    body['ApplicationIds'] = request.applicationIdsShrink;
  }
  if (!$isNull(request.connectorId)) {
    body['ConnectorId'] = request.connectorId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'AttachApplication2Connector',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 挂载connector的应用
 *
 * @param request AttachApplication2ConnectorRequest
 * @return AttachApplication2ConnectorResponse
 */
async function attachApplication2Connector(request: AttachApplication2ConnectorRequest): AttachApplication2ConnectorResponse {
  var runtime = new $RuntimeOptions{};
  return attachApplication2ConnectorWithOptions(request, runtime);
}

model AttachPolicy2ApprovalProcessRequest {
  policyId?: string(name='PolicyId', example='ladp-27a4fedf5e73****'),
  policyType?: string(name='PolicyType', description='This parameter is required.', example='DlpSend'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='approval-process-2677fcf063f5****'),
}

model AttachPolicy2ApprovalProcessResponseBody = {
  requestId?: string(name='RequestId', example='C51D9340-4604-5331-AE62-407F3B408F86'),
}

model AttachPolicy2ApprovalProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachPolicy2ApprovalProcessResponseBody(name='body'),
}

/**
 * @summary 挂载业务策略至指定审批流程
 *
 * @param request AttachPolicy2ApprovalProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachPolicy2ApprovalProcessResponse
 */
async function attachPolicy2ApprovalProcessWithOptions(request: AttachPolicy2ApprovalProcessRequest, runtime: $RuntimeOptions): AttachPolicy2ApprovalProcessResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.policyId)) {
    body['PolicyId'] = request.policyId;
  }
  if (!$isNull(request.policyType)) {
    body['PolicyType'] = request.policyType;
  }
  if (!$isNull(request.processId)) {
    body['ProcessId'] = request.processId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'AttachPolicy2ApprovalProcess',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 挂载业务策略至指定审批流程
 *
 * @param request AttachPolicy2ApprovalProcessRequest
 * @return AttachPolicy2ApprovalProcessResponse
 */
async function attachPolicy2ApprovalProcess(request: AttachPolicy2ApprovalProcessRequest): AttachPolicy2ApprovalProcessResponse {
  var runtime = new $RuntimeOptions{};
  return attachPolicy2ApprovalProcessWithOptions(request, runtime);
}

model CreateApprovalProcessRequest {
  description?: string(name='Description'),
  matchSchemas?: {
    appUninstallSchemaId?: string(name='AppUninstallSchemaId', example='approval-schema-090134f1ebff****'),
    deviceRegistrationSchemaId?: string(name='DeviceRegistrationSchemaId', example='approval-schema-090134f1ebff****'),
    dlpSendSchemaId?: string(name='DlpSendSchemaId', example='approval-schema-090134f1ebff****'),
    domainBlacklistSchemaId?: string(name='DomainBlacklistSchemaId', example='approval-schema-090134f1ebff****'),
    domainWhitelistSchemaId?: string(name='DomainWhitelistSchemaId', example='approval-schema-090134f1ebff****'),
    endpointHardeningSchemaId?: string(name='EndpointHardeningSchemaId'),
    peripheralBlockSchemaId?: string(name='PeripheralBlockSchemaId', example='approval-schema-090134f1ebff****'),
    softwareBlockSchemaId?: string(name='SoftwareBlockSchemaId', example='approval-schema-090134f1ebff****'),
    softwareHardeningSchemaId?: string(name='SoftwareHardeningSchemaId'),
  }(name='MatchSchemas'),
  processName?: string(name='ProcessName', description='This parameter is required.', example='test_process'),
  processNodes?: [[ string ]  ](name='ProcessNodes', description='This parameter is required.'),
}

model CreateApprovalProcessShrinkRequest {
  description?: string(name='Description'),
  matchSchemasShrink?: string(name='MatchSchemas'),
  processName?: string(name='ProcessName', description='This parameter is required.', example='test_process'),
  processNodes?: [[ string ]  ](name='ProcessNodes', description='This parameter is required.'),
}

model CreateApprovalProcessResponseBody = {
  process?: {
    appUninstallPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='AppUninstallPolicies'),
    createTime?: string(name='CreateTime', example='2022-10-25 10:44:09'),
    description?: string(name='Description'),
    deviceRegistrationPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DeviceRegistrationPolicies'),
    dlpSendPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DlpSendPolicies'),
    domainBlacklistPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DomainBlacklistPolicies'),
    domainWhitelistPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DomainWhitelistPolicies'),
    endpointHardeningPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId'),
    }(name='EndpointHardeningPolicies'),
    peripheralBlockPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='PeripheralBlockPolicies'),
    processId?: string(name='ProcessId', example='approval-process-dc61e92ba5c5****'),
    processName?: string(name='ProcessName'),
    processNodes?: [[ 
      {
        saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
        username?: string(name='Username'),
      }
    ]    ](name='ProcessNodes'),
    softwareBlockPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='SoftwareBlockPolicies'),
    softwareHardeningPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId'),
    }(name='SoftwareHardeningPolicies'),
  }(name='Process'),
  requestId?: string(name='RequestId', example='2CABFEBB-0CE7-575E-833A-266F75D46713'),
}

model CreateApprovalProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateApprovalProcessResponseBody(name='body'),
}

/**
 * @summary 创建审批流程
 *
 * @param tmpReq CreateApprovalProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateApprovalProcessResponse
 */
async function createApprovalProcessWithOptions(tmpReq: CreateApprovalProcessRequest, runtime: $RuntimeOptions): CreateApprovalProcessResponse {
  tmpReq.validate();
  var request = new CreateApprovalProcessShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.matchSchemas)) {
    request.matchSchemasShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.matchSchemas, 'MatchSchemas', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.matchSchemasShrink)) {
    body['MatchSchemas'] = request.matchSchemasShrink;
  }
  if (!$isNull(request.processName)) {
    body['ProcessName'] = request.processName;
  }
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.processNodes)) {
    bodyFlat['ProcessNodes'] = request.processNodes;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateApprovalProcess',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建审批流程
 *
 * @param request CreateApprovalProcessRequest
 * @return CreateApprovalProcessResponse
 */
async function createApprovalProcess(request: CreateApprovalProcessRequest): CreateApprovalProcessResponse {
  var runtime = new $RuntimeOptions{};
  return createApprovalProcessWithOptions(request, runtime);
}

model CreateClientUserRequest {
  departmentId?: string(name='DepartmentId', example='10797'),
  description?: string(name='Description'),
  email?: string(name='Email', description='This parameter is required.', example='johndoe@example.com'),
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='727'),
  mobileNumber?: string(name='MobileNumber', example='13641966835'),
  password?: string(name='Password', example='kehudiyi'),
  username?: string(name='Username', description='This parameter is required.'),
}

model CreateClientUserResponseBody = {
  data?: string(name='Data', example='726'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model CreateClientUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClientUserResponseBody(name='body'),
}

/**
 * @summary 创建自定义身份源用户
 *
 * @param request CreateClientUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClientUserResponse
 */
async function createClientUserWithOptions(request: CreateClientUserRequest, runtime: $RuntimeOptions): CreateClientUserResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.departmentId)) {
    query['DepartmentId'] = request.departmentId;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.email)) {
    query['Email'] = request.email;
  }
  if (!$isNull(request.idpConfigId)) {
    query['IdpConfigId'] = request.idpConfigId;
  }
  if (!$isNull(request.mobileNumber)) {
    query['MobileNumber'] = request.mobileNumber;
  }
  if (!$isNull(request.password)) {
    query['Password'] = request.password;
  }
  if (!$isNull(request.username)) {
    query['Username'] = request.username;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateClientUser',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建自定义身份源用户
 *
 * @param request CreateClientUserRequest
 * @return CreateClientUserResponse
 */
async function createClientUser(request: CreateClientUserRequest): CreateClientUserResponse {
  var runtime = new $RuntimeOptions{};
  return createClientUserWithOptions(request, runtime);
}

model CreateDynamicRouteRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  applicationType?: string(name='ApplicationType', description='This parameter is required.', example='Application'),
  description?: string(name='Description'),
  dynamicRouteType?: string(name='DynamicRouteType', description='This parameter is required.', example='connector'),
  name?: string(name='Name', description='This parameter is required.', example='dynamic_route_name'),
  nextHop?: string(name='NextHop', description='This parameter is required.', example='connector-8ccb13b6f52c****'),
  priority?: int32(name='Priority', description='This parameter is required.', example='99'),
  regionIds?: [ string ](name='RegionIds', description='This parameter is required.'),
  status?: string(name='Status', description='This parameter is required.', example='Disabled'),
  tagIds?: [ string ](name='TagIds'),
}

model CreateDynamicRouteResponseBody = {
  dynamicRouteId?: string(name='DynamicRouteId', example='dr-ca9fddfac7c6****'),
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
}

model CreateDynamicRouteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDynamicRouteResponseBody(name='body'),
}

/**
 * @summary 创建动态路由
 *
 * @param request CreateDynamicRouteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDynamicRouteResponse
 */
async function createDynamicRouteWithOptions(request: CreateDynamicRouteRequest, runtime: $RuntimeOptions): CreateDynamicRouteResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.applicationIds)) {
    bodyFlat['ApplicationIds'] = request.applicationIds;
  }
  if (!$isNull(request.applicationType)) {
    body['ApplicationType'] = request.applicationType;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.dynamicRouteType)) {
    body['DynamicRouteType'] = request.dynamicRouteType;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.nextHop)) {
    body['NextHop'] = request.nextHop;
  }
  if (!$isNull(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!$isNull(request.regionIds)) {
    bodyFlat['RegionIds'] = request.regionIds;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  if (!$isNull(request.tagIds)) {
    bodyFlat['TagIds'] = request.tagIds;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDynamicRoute',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建动态路由
 *
 * @param request CreateDynamicRouteRequest
 * @return CreateDynamicRouteResponse
 */
async function createDynamicRoute(request: CreateDynamicRouteRequest): CreateDynamicRouteResponse {
  var runtime = new $RuntimeOptions{};
  return createDynamicRouteWithOptions(request, runtime);
}

model CreateIdpDepartmentRequest {
  departmentName?: string(name='DepartmentName', description='This parameter is required.'),
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='1222'),
}

model CreateIdpDepartmentResponseBody = {
  data?: string(name='Data', example='726'),
  requestId?: string(name='RequestId', example='D6707286-A50E-57B1-B2CF-EFAC59E850D8'),
}

model CreateIdpDepartmentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateIdpDepartmentResponseBody(name='body'),
}

/**
 * @summary 创建自定义身份源部门
 *
 * @param request CreateIdpDepartmentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateIdpDepartmentResponse
 */
async function createIdpDepartmentWithOptions(request: CreateIdpDepartmentRequest, runtime: $RuntimeOptions): CreateIdpDepartmentResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.departmentName)) {
    query['DepartmentName'] = request.departmentName;
  }
  if (!$isNull(request.idpConfigId)) {
    query['IdpConfigId'] = request.idpConfigId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateIdpDepartment',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建自定义身份源部门
 *
 * @param request CreateIdpDepartmentRequest
 * @return CreateIdpDepartmentResponse
 */
async function createIdpDepartment(request: CreateIdpDepartmentRequest): CreateIdpDepartmentResponse {
  var runtime = new $RuntimeOptions{};
  return createIdpDepartmentWithOptions(request, runtime);
}

model CreatePrivateAccessApplicationRequest {
  addresses?: [ string ](name='Addresses', description='This parameter is required.'),
  browserAccessStatus?: string(name='BrowserAccessStatus'),
  description?: string(name='Description'),
  l7Config?: PAL7Config(name='L7Config'),
  l7ProxyDomainAutomaticPrefix?: string(name='L7ProxyDomainAutomaticPrefix'),
  l7ProxyDomainCustom?: string(name='L7ProxyDomainCustom'),
  name?: string(name='Name', description='This parameter is required.', example='private_access_application_name'),
  portRanges?: [ 
    {
      begin?: int32(name='Begin', description='This parameter is required.', example='80'),
      end?: int32(name='End', description='This parameter is required.', example='81'),
    }
  ](name='PortRanges', description='This parameter is required.'),
  protocol?: string(name='Protocol', description='This parameter is required.', example='All'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
  tagIds?: [ string ](name='TagIds'),
}

model CreatePrivateAccessApplicationShrinkRequest {
  addresses?: [ string ](name='Addresses', description='This parameter is required.'),
  browserAccessStatus?: string(name='BrowserAccessStatus'),
  description?: string(name='Description'),
  l7ConfigShrink?: string(name='L7Config'),
  l7ProxyDomainAutomaticPrefix?: string(name='L7ProxyDomainAutomaticPrefix'),
  l7ProxyDomainCustom?: string(name='L7ProxyDomainCustom'),
  name?: string(name='Name', description='This parameter is required.', example='private_access_application_name'),
  portRanges?: [ 
    {
      begin?: int32(name='Begin', description='This parameter is required.', example='80'),
      end?: int32(name='End', description='This parameter is required.', example='81'),
    }
  ](name='PortRanges', description='This parameter is required.'),
  protocol?: string(name='Protocol', description='This parameter is required.', example='All'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
  tagIds?: [ string ](name='TagIds'),
}

model CreatePrivateAccessApplicationResponseBody = {
  applicationId?: string(name='ApplicationId', example='pa-application-e12860ef6c48****'),
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model CreatePrivateAccessApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePrivateAccessApplicationResponseBody(name='body'),
}

/**
 * @summary 创建内网访问应用
 *
 * @param tmpReq CreatePrivateAccessApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePrivateAccessApplicationResponse
 */
async function createPrivateAccessApplicationWithOptions(tmpReq: CreatePrivateAccessApplicationRequest, runtime: $RuntimeOptions): CreatePrivateAccessApplicationResponse {
  tmpReq.validate();
  var request = new CreatePrivateAccessApplicationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.l7Config)) {
    request.l7ConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.l7Config, 'L7Config', 'json');
  }
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.addresses)) {
    bodyFlat['Addresses'] = request.addresses;
  }
  if (!$isNull(request.browserAccessStatus)) {
    body['BrowserAccessStatus'] = request.browserAccessStatus;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.l7ConfigShrink)) {
    body['L7Config'] = request.l7ConfigShrink;
  }
  if (!$isNull(request.l7ProxyDomainAutomaticPrefix)) {
    body['L7ProxyDomainAutomaticPrefix'] = request.l7ProxyDomainAutomaticPrefix;
  }
  if (!$isNull(request.l7ProxyDomainCustom)) {
    body['L7ProxyDomainCustom'] = request.l7ProxyDomainCustom;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.portRanges)) {
    bodyFlat['PortRanges'] = request.portRanges;
  }
  if (!$isNull(request.protocol)) {
    body['Protocol'] = request.protocol;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  if (!$isNull(request.tagIds)) {
    bodyFlat['TagIds'] = request.tagIds;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreatePrivateAccessApplication',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建内网访问应用
 *
 * @param request CreatePrivateAccessApplicationRequest
 * @return CreatePrivateAccessApplicationResponse
 */
async function createPrivateAccessApplication(request: CreatePrivateAccessApplicationRequest): CreatePrivateAccessApplicationResponse {
  var runtime = new $RuntimeOptions{};
  return createPrivateAccessApplicationWithOptions(request, runtime);
}

model CreatePrivateAccessPolicyRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  applicationType?: string(name='ApplicationType', description='This parameter is required.', example='Application'),
  customUserAttributes?: [ 
    {
      idpId?: int32(name='IdpId', example='12'),
      relation?: string(name='Relation', example='Equal'),
      userGroupType?: string(name='UserGroupType', example='department'),
      value?: string(name='Value'),
    }
  ](name='CustomUserAttributes'),
  description?: string(name='Description'),
  deviceAttributeAction?: string(name='DeviceAttributeAction'),
  deviceAttributeId?: string(name='DeviceAttributeId'),
  name?: string(name='Name', description='This parameter is required.', example='private_access_policy_name'),
  policyAction?: string(name='PolicyAction', description='This parameter is required.', example='Allow'),
  priority?: int32(name='Priority', description='This parameter is required.', example='1'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
  tagIds?: [ string ](name='TagIds', description='内网访问标签ID集合。最多可输入100个内网访问标签ID。当**ApplicationType**为**Tag时**，必填。和**ApplicationIds**互斥。'),
  triggerTemplateId?: string(name='TriggerTemplateId'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  userGroupMode?: string(name='UserGroupMode', description='内网访问策略的用户组类型。取值：
- **Normal**：普通用户组。
- **Custom**：自定义用户组。

This parameter is required.', example='Normal'),
}

model CreatePrivateAccessPolicyResponseBody = {
  policyId?: string(name='PolicyId', example='pa-policy-867ef4007c8a****'),
  requestId?: string(name='RequestId', example='EFE7EBB2-449D-5BBB-B381-CA7839BC1649'),
}

model CreatePrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 创建内网访问策略
 *
 * @param request CreatePrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePrivateAccessPolicyResponse
 */
async function createPrivateAccessPolicyWithOptions(request: CreatePrivateAccessPolicyRequest, runtime: $RuntimeOptions): CreatePrivateAccessPolicyResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.applicationIds)) {
    bodyFlat['ApplicationIds'] = request.applicationIds;
  }
  if (!$isNull(request.applicationType)) {
    body['ApplicationType'] = request.applicationType;
  }
  if (!$isNull(request.customUserAttributes)) {
    bodyFlat['CustomUserAttributes'] = request.customUserAttributes;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.deviceAttributeAction)) {
    body['DeviceAttributeAction'] = request.deviceAttributeAction;
  }
  if (!$isNull(request.deviceAttributeId)) {
    body['DeviceAttributeId'] = request.deviceAttributeId;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.policyAction)) {
    body['PolicyAction'] = request.policyAction;
  }
  if (!$isNull(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  if (!$isNull(request.tagIds)) {
    bodyFlat['TagIds'] = request.tagIds;
  }
  if (!$isNull(request.triggerTemplateId)) {
    body['TriggerTemplateId'] = request.triggerTemplateId;
  }
  if (!$isNull(request.userGroupIds)) {
    bodyFlat['UserGroupIds'] = request.userGroupIds;
  }
  if (!$isNull(request.userGroupMode)) {
    body['UserGroupMode'] = request.userGroupMode;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreatePrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建内网访问策略
 *
 * @param request CreatePrivateAccessPolicyRequest
 * @return CreatePrivateAccessPolicyResponse
 */
async function createPrivateAccessPolicy(request: CreatePrivateAccessPolicyRequest): CreatePrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return createPrivateAccessPolicyWithOptions(request, runtime);
}

model CreatePrivateAccessTagRequest {
  description?: string(name='Description'),
  name?: string(name='Name', description='This parameter is required.', example='tag_name'),
}

model CreatePrivateAccessTagResponseBody = {
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
  tagId?: string(name='TagId', example='tag-d3f64e8bdd4a****'),
}

model CreatePrivateAccessTagResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePrivateAccessTagResponseBody(name='body'),
}

/**
 * @summary 创建内网访问标签
 *
 * @param request CreatePrivateAccessTagRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePrivateAccessTagResponse
 */
async function createPrivateAccessTagWithOptions(request: CreatePrivateAccessTagRequest, runtime: $RuntimeOptions): CreatePrivateAccessTagResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreatePrivateAccessTag',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建内网访问标签
 *
 * @param request CreatePrivateAccessTagRequest
 * @return CreatePrivateAccessTagResponse
 */
async function createPrivateAccessTag(request: CreatePrivateAccessTagRequest): CreatePrivateAccessTagResponse {
  var runtime = new $RuntimeOptions{};
  return createPrivateAccessTagWithOptions(request, runtime);
}

model CreateRegistrationPolicyRequest {
  companyLimitCount?: {
    all?: int32(name='All', example='1'),
    mobile?: int32(name='Mobile', example='0'),
    PC?: int32(name='PC', example='0'),
  }(name='CompanyLimitCount'),
  companyLimitType?: string(name='CompanyLimitType', description='This parameter is required.', example='LimitAll'),
  description?: string(name='Description'),
  matchMode?: string(name='MatchMode', description='This parameter is required.', example='UserGroupAll'),
  name?: string(name='Name', description='This parameter is required.', example='registration_policy_name'),
  personalLimitCount?: {
    all?: int32(name='All', example='0'),
    mobile?: int32(name='Mobile', example='3'),
    PC?: int32(name='PC', example='2'),
  }(name='PersonalLimitCount'),
  personalLimitType?: string(name='PersonalLimitType', description='This parameter is required.', example='LimitDiff'),
  priority?: long(name='Priority', example='99'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelist?: [ string ](name='Whitelist'),
}

model CreateRegistrationPolicyShrinkRequest {
  companyLimitCountShrink?: string(name='CompanyLimitCount'),
  companyLimitType?: string(name='CompanyLimitType', description='This parameter is required.', example='LimitAll'),
  description?: string(name='Description'),
  matchMode?: string(name='MatchMode', description='This parameter is required.', example='UserGroupAll'),
  name?: string(name='Name', description='This parameter is required.', example='registration_policy_name'),
  personalLimitCountShrink?: string(name='PersonalLimitCount'),
  personalLimitType?: string(name='PersonalLimitType', description='This parameter is required.', example='LimitDiff'),
  priority?: long(name='Priority', example='99'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelist?: [ string ](name='Whitelist'),
}

model CreateRegistrationPolicyResponseBody = {
  policy?: {
    createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
    description?: string(name='Description'),
    limitDetail?: [ 
      {
        deviceBelong?: string(name='DeviceBelong', example='Company'),
        limitCount?: {
          all?: int32(name='All', example='0'),
          mobile?: int32(name='Mobile', example='3'),
          PC?: int32(name='PC', example='2'),
        }(name='LimitCount'),
        limitType?: string(name='LimitType', example='LimitDiff'),
      }
    ](name='LimitDetail'),
    matchMode?: string(name='MatchMode', example='UserGroupNormal'),
    name?: string(name='Name', example='registration_policy_name'),
    policyId?: string(name='PolicyId', example='reg-policy-dcbfd33cb004****'),
    priority?: string(name='Priority', example='1'),
    status?: string(name='Status', example='Enabled'),
    userGroupIds?: [ string ](name='UserGroupIds'),
    whitelist?: [ string ](name='Whitelist'),
  }(name='Policy'),
  requestId?: string(name='RequestId', example='FEF1144C-95D1-5F7C-81EF-9DB70EA49FCE'),
}

model CreateRegistrationPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRegistrationPolicyResponseBody(name='body'),
}

/**
 * @summary 创建设备注册策略
 *
 * @param tmpReq CreateRegistrationPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRegistrationPolicyResponse
 */
async function createRegistrationPolicyWithOptions(tmpReq: CreateRegistrationPolicyRequest, runtime: $RuntimeOptions): CreateRegistrationPolicyResponse {
  tmpReq.validate();
  var request = new CreateRegistrationPolicyShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.companyLimitCount)) {
    request.companyLimitCountShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.companyLimitCount, 'CompanyLimitCount', 'json');
  }
  if (!$isNull(tmpReq.personalLimitCount)) {
    request.personalLimitCountShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.personalLimitCount, 'PersonalLimitCount', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.companyLimitCountShrink)) {
    body['CompanyLimitCount'] = request.companyLimitCountShrink;
  }
  if (!$isNull(request.companyLimitType)) {
    body['CompanyLimitType'] = request.companyLimitType;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.matchMode)) {
    body['MatchMode'] = request.matchMode;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.personalLimitCountShrink)) {
    body['PersonalLimitCount'] = request.personalLimitCountShrink;
  }
  if (!$isNull(request.personalLimitType)) {
    body['PersonalLimitType'] = request.personalLimitType;
  }
  if (!$isNull(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.userGroupIds)) {
    bodyFlat['UserGroupIds'] = request.userGroupIds;
  }
  if (!$isNull(request.whitelist)) {
    bodyFlat['Whitelist'] = request.whitelist;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateRegistrationPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建设备注册策略
 *
 * @param request CreateRegistrationPolicyRequest
 * @return CreateRegistrationPolicyResponse
 */
async function createRegistrationPolicy(request: CreateRegistrationPolicyRequest): CreateRegistrationPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return createRegistrationPolicyWithOptions(request, runtime);
}

model CreateUserGroupRequest {
  attributes?: [ 
    {
      idpId?: int32(name='IdpId', example='12'),
      relation?: string(name='Relation', description='This parameter is required.', example='Equal'),
      userGroupType?: string(name='UserGroupType', description='This parameter is required.', example='department'),
      value?: string(name='Value', description='This parameter is required.'),
    }
  ](name='Attributes', description='This parameter is required.'),
  description?: string(name='Description'),
  name?: string(name='Name', description='This parameter is required.', example='user_group_name'),
}

model CreateUserGroupResponseBody = {
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
  userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
}

model CreateUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateUserGroupResponseBody(name='body'),
}

/**
 * @summary 创建用户组
 *
 * @param request CreateUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateUserGroupResponse
 */
async function createUserGroupWithOptions(request: CreateUserGroupRequest, runtime: $RuntimeOptions): CreateUserGroupResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.attributes)) {
    bodyFlat['Attributes'] = request.attributes;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateUserGroup',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建用户组
 *
 * @param request CreateUserGroupRequest
 * @return CreateUserGroupResponse
 */
async function createUserGroup(request: CreateUserGroupRequest): CreateUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return createUserGroupWithOptions(request, runtime);
}

model CreateWmBaseImageRequest {
  height?: int32(name='Height', description='This parameter is required.', example='1080'),
  opacity?: int32(name='Opacity', description='This parameter is required.', example='255'),
  scale?: int32(name='Scale', description='This parameter is required.', example='1'),
  width?: int32(name='Width', description='This parameter is required.', example='1920'),
  wmInfoBytesB64?: string(name='WmInfoBytesB64', example='aGVsbG8gc2F*****'),
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmInfoUint?: string(name='WmInfoUint', example='12*****'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureWebappInvisible'),
}

model CreateWmBaseImageResponseBody = {
  data?: {
    imageId?: string(name='ImageId', example='fafb432cdede9b20640e12105845386e-496883833-8242409229217337*****'),
    imageUrl?: string(name='ImageUrl', example='https://example.com/test-*****.png'),
    imageUrlExp?: long(name='ImageUrlExp', example='17185*****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model CreateWmBaseImageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateWmBaseImageResponseBody(name='body'),
}

/**
 * @summary 创建数字水印暗水印透明底图
 *
 * @param request CreateWmBaseImageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateWmBaseImageResponse
 */
async function createWmBaseImageWithOptions(request: CreateWmBaseImageRequest, runtime: $RuntimeOptions): CreateWmBaseImageResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.height)) {
    body['Height'] = request.height;
  }
  if (!$isNull(request.opacity)) {
    body['Opacity'] = request.opacity;
  }
  if (!$isNull(request.scale)) {
    body['Scale'] = request.scale;
  }
  if (!$isNull(request.width)) {
    body['Width'] = request.width;
  }
  if (!$isNull(request.wmInfoBytesB64)) {
    body['WmInfoBytesB64'] = request.wmInfoBytesB64;
  }
  if (!$isNull(request.wmInfoSize)) {
    body['WmInfoSize'] = request.wmInfoSize;
  }
  if (!$isNull(request.wmInfoUint)) {
    body['WmInfoUint'] = request.wmInfoUint;
  }
  if (!$isNull(request.wmType)) {
    body['WmType'] = request.wmType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateWmBaseImage',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建数字水印暗水印透明底图
 *
 * @param request CreateWmBaseImageRequest
 * @return CreateWmBaseImageResponse
 */
async function createWmBaseImage(request: CreateWmBaseImageRequest): CreateWmBaseImageResponse {
  var runtime = new $RuntimeOptions{};
  return createWmBaseImageWithOptions(request, runtime);
}

model CreateWmEmbedTaskRequest {
  csvControl?: {
    embedBitsNumberInEachTime?: long(name='EmbedBitsNumberInEachTime'),
    embedColumn?: long(name='EmbedColumn'),
    embedDensity?: string(name='EmbedDensity'),
    embedPrecision?: long(name='EmbedPrecision'),
    embedTimePosition?: string(name='EmbedTimePosition'),
    method?: string(name='Method'),
    timeFormat?: string(name='TimeFormat'),
  }(name='CsvControl'),
  documentControl?: {
    backgroundControl?: {
      bgAddInvisible?: boolean(name='BgAddInvisible', example='true'),
      bgAddVisible?: boolean(name='BgAddVisible', example='true'),
      bgInvisibleControl?: {
        opacity?: long(name='Opacity', example='10'),
      }(name='BgInvisibleControl'),
      bgVisibleControl?: {
        angle?: long(name='Angle', example='30'),
        fontColor?: string(name='FontColor', example='0x000000'),
        fontSize?: long(name='FontSize', example='30'),
        horizontalNumber?: long(name='HorizontalNumber', example='3'),
        mode?: string(name='Mode', example='pos'),
        opacity?: long(name='Opacity', example='100'),
        posX?: string(name='PosX', example='0.5'),
        posY?: string(name='PosY', example='0.5'),
        verticalNumber?: long(name='VerticalNumber', example='3'),
        visibleText?: string(name='VisibleText', example='hello ****'),
      }(name='BgVisibleControl'),
    }(name='BackgroundControl'),
    invisibleAntiAllCopy?: boolean(name='InvisibleAntiAllCopy', example='true'),
    invisibleAntiTextCopy?: boolean(name='InvisibleAntiTextCopy', example='true'),
  }(name='DocumentControl'),
  fileUrl?: string(name='FileUrl', description='This parameter is required.', example='https://example.com/abc****.pdf'),
  filename?: string(name='Filename', description='This parameter is required.', example='abc****.pdf'),
  imageEmbedJpegQuality?: long(name='ImageEmbedJpegQuality', example='95'),
  imageEmbedLevel?: long(name='ImageEmbedLevel', example='2'),
  videoBitrate?: string(name='VideoBitrate', example='3000k'),
  videoIsLong?: boolean(name='VideoIsLong', example='false'),
  wmInfoBytesB64?: string(name='WmInfoBytesB64', example='aGVsbG8gc2F*****'),
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmInfoUint?: string(name='WmInfoUint', example='123***'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureDocument'),
}

model CreateWmEmbedTaskShrinkRequest {
  csvControlShrink?: string(name='CsvControl'),
  documentControlShrink?: string(name='DocumentControl'),
  fileUrl?: string(name='FileUrl', description='This parameter is required.', example='https://example.com/abc****.pdf'),
  filename?: string(name='Filename', description='This parameter is required.', example='abc****.pdf'),
  imageEmbedJpegQuality?: long(name='ImageEmbedJpegQuality', example='95'),
  imageEmbedLevel?: long(name='ImageEmbedLevel', example='2'),
  videoBitrate?: string(name='VideoBitrate', example='3000k'),
  videoIsLong?: boolean(name='VideoIsLong', example='false'),
  wmInfoBytesB64?: string(name='WmInfoBytesB64', example='aGVsbG8gc2F*****'),
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmInfoUint?: string(name='WmInfoUint', example='123***'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureDocument'),
}

model CreateWmEmbedTaskResponseBody = {
  data?: {
    taskId?: string(name='TaskId', example='job:5GfrJYsoaffmCE7Z5bZtjUefzxfd****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model CreateWmEmbedTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateWmEmbedTaskResponseBody(name='body'),
}

/**
 * @summary 创建嵌入水印任务
 *
 * @param tmpReq CreateWmEmbedTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateWmEmbedTaskResponse
 */
async function createWmEmbedTaskWithOptions(tmpReq: CreateWmEmbedTaskRequest, runtime: $RuntimeOptions): CreateWmEmbedTaskResponse {
  tmpReq.validate();
  var request = new CreateWmEmbedTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.csvControl)) {
    request.csvControlShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.csvControl, 'CsvControl', 'json');
  }
  if (!$isNull(tmpReq.documentControl)) {
    request.documentControlShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.documentControl, 'DocumentControl', 'json');
  }
  var query = {};
  if (!$isNull(request.csvControlShrink)) {
    query['CsvControl'] = request.csvControlShrink;
  }
  var body : map[string]any = {};
  if (!$isNull(request.documentControlShrink)) {
    body['DocumentControl'] = request.documentControlShrink;
  }
  if (!$isNull(request.fileUrl)) {
    body['FileUrl'] = request.fileUrl;
  }
  if (!$isNull(request.filename)) {
    body['Filename'] = request.filename;
  }
  if (!$isNull(request.imageEmbedJpegQuality)) {
    body['ImageEmbedJpegQuality'] = request.imageEmbedJpegQuality;
  }
  if (!$isNull(request.imageEmbedLevel)) {
    body['ImageEmbedLevel'] = request.imageEmbedLevel;
  }
  if (!$isNull(request.videoBitrate)) {
    body['VideoBitrate'] = request.videoBitrate;
  }
  if (!$isNull(request.videoIsLong)) {
    body['VideoIsLong'] = request.videoIsLong;
  }
  if (!$isNull(request.wmInfoBytesB64)) {
    body['WmInfoBytesB64'] = request.wmInfoBytesB64;
  }
  if (!$isNull(request.wmInfoSize)) {
    body['WmInfoSize'] = request.wmInfoSize;
  }
  if (!$isNull(request.wmInfoUint)) {
    body['WmInfoUint'] = request.wmInfoUint;
  }
  if (!$isNull(request.wmType)) {
    body['WmType'] = request.wmType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateWmEmbedTask',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建嵌入水印任务
 *
 * @param request CreateWmEmbedTaskRequest
 * @return CreateWmEmbedTaskResponse
 */
async function createWmEmbedTask(request: CreateWmEmbedTaskRequest): CreateWmEmbedTaskResponse {
  var runtime = new $RuntimeOptions{};
  return createWmEmbedTaskWithOptions(request, runtime);
}

model CreateWmExtractTaskRequest {
  csvControl?: {
    embedBitsNumberInEachTime?: long(name='EmbedBitsNumberInEachTime'),
    embedColumn?: long(name='EmbedColumn'),
    embedPrecision?: long(name='EmbedPrecision'),
    embedTimePosition?: string(name='EmbedTimePosition'),
    method?: string(name='Method'),
    timeFormat?: string(name='TimeFormat'),
  }(name='CsvControl'),
  documentIsCapture?: boolean(name='DocumentIsCapture', example='false'),
  fileUrl?: string(name='FileUrl', description='This parameter is required.', example='https://example.com/test-****.pdf'),
  filename?: string(name='Filename', description='This parameter is required.', example='test-****.pdf'),
  videoIsLong?: boolean(name='VideoIsLong', example='false'),
  videoSpeed?: string(name='VideoSpeed', example='1'),
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureDocument'),
}

model CreateWmExtractTaskShrinkRequest {
  csvControlShrink?: string(name='CsvControl'),
  documentIsCapture?: boolean(name='DocumentIsCapture', example='false'),
  fileUrl?: string(name='FileUrl', description='This parameter is required.', example='https://example.com/test-****.pdf'),
  filename?: string(name='Filename', description='This parameter is required.', example='test-****.pdf'),
  videoIsLong?: boolean(name='VideoIsLong', example='false'),
  videoSpeed?: string(name='VideoSpeed', example='1'),
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureDocument'),
}

model CreateWmExtractTaskResponseBody = {
  data?: {
    taskId?: string(name='TaskId', example='wmt-9648c22d2eb2cb57bb855dcae7898464********'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='D6707286-A50E-57B1-B2CF-EFAC59E850D8'),
}

model CreateWmExtractTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateWmExtractTaskResponseBody(name='body'),
}

/**
 * @summary 创建文件水印提取任务
 *
 * @param tmpReq CreateWmExtractTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateWmExtractTaskResponse
 */
async function createWmExtractTaskWithOptions(tmpReq: CreateWmExtractTaskRequest, runtime: $RuntimeOptions): CreateWmExtractTaskResponse {
  tmpReq.validate();
  var request = new CreateWmExtractTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.csvControl)) {
    request.csvControlShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.csvControl, 'CsvControl', 'json');
  }
  var query = {};
  if (!$isNull(request.csvControlShrink)) {
    query['CsvControl'] = request.csvControlShrink;
  }
  var body : map[string]any = {};
  if (!$isNull(request.documentIsCapture)) {
    body['DocumentIsCapture'] = request.documentIsCapture;
  }
  if (!$isNull(request.fileUrl)) {
    body['FileUrl'] = request.fileUrl;
  }
  if (!$isNull(request.filename)) {
    body['Filename'] = request.filename;
  }
  if (!$isNull(request.videoIsLong)) {
    body['VideoIsLong'] = request.videoIsLong;
  }
  if (!$isNull(request.videoSpeed)) {
    body['VideoSpeed'] = request.videoSpeed;
  }
  if (!$isNull(request.wmInfoSize)) {
    body['WmInfoSize'] = request.wmInfoSize;
  }
  if (!$isNull(request.wmType)) {
    body['WmType'] = request.wmType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateWmExtractTask',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建文件水印提取任务
 *
 * @param request CreateWmExtractTaskRequest
 * @return CreateWmExtractTaskResponse
 */
async function createWmExtractTask(request: CreateWmExtractTaskRequest): CreateWmExtractTaskResponse {
  var runtime = new $RuntimeOptions{};
  return createWmExtractTaskWithOptions(request, runtime);
}

model CreateWmInfoMappingRequest {
  wmInfoBytesB64?: string(name='WmInfoBytesB64', description='This parameter is required.', example='aGVsbG8gc2F*****'),
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureDocument'),
}

model CreateWmInfoMappingResponseBody = {
  data?: {
    wmInfoUint?: long(name='WmInfoUint', example='123***'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='7E9D7ACD-53D5-56EF-A913-79D148D06299'),
}

model CreateWmInfoMappingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateWmInfoMappingResponseBody(name='body'),
}

/**
 * @summary 创建一条字符串水印信息到数字水印信息的映射记录
 *
 * @param request CreateWmInfoMappingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateWmInfoMappingResponse
 */
async function createWmInfoMappingWithOptions(request: CreateWmInfoMappingRequest, runtime: $RuntimeOptions): CreateWmInfoMappingResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.wmInfoBytesB64)) {
    body['WmInfoBytesB64'] = request.wmInfoBytesB64;
  }
  if (!$isNull(request.wmInfoSize)) {
    body['WmInfoSize'] = request.wmInfoSize;
  }
  if (!$isNull(request.wmType)) {
    body['WmType'] = request.wmType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateWmInfoMapping',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建一条字符串水印信息到数字水印信息的映射记录
 *
 * @param request CreateWmInfoMappingRequest
 * @return CreateWmInfoMappingResponse
 */
async function createWmInfoMapping(request: CreateWmInfoMappingRequest): CreateWmInfoMappingResponse {
  var runtime = new $RuntimeOptions{};
  return createWmInfoMappingWithOptions(request, runtime);
}

model DeleteApprovalProcessesRequest {
  processIds?: [ string ](name='ProcessIds', description='This parameter is required.'),
}

model DeleteApprovalProcessesResponseBody = {
  requestId?: string(name='RequestId', example='B608C6AE-623D-55C4-9454-601B88AE937E'),
}

model DeleteApprovalProcessesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApprovalProcessesResponseBody(name='body'),
}

/**
 * @summary 批量删除审批流程
 *
 * @param request DeleteApprovalProcessesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApprovalProcessesResponse
 */
async function deleteApprovalProcessesWithOptions(request: DeleteApprovalProcessesRequest, runtime: $RuntimeOptions): DeleteApprovalProcessesResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.processIds)) {
    bodyFlat['ProcessIds'] = request.processIds;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteApprovalProcesses',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量删除审批流程
 *
 * @param request DeleteApprovalProcessesRequest
 * @return DeleteApprovalProcessesResponse
 */
async function deleteApprovalProcesses(request: DeleteApprovalProcessesRequest): DeleteApprovalProcessesResponse {
  var runtime = new $RuntimeOptions{};
  return deleteApprovalProcessesWithOptions(request, runtime);
}

model DeleteClientUserRequest {
  id?: string(name='Id', description='This parameter is required.', example='27058'),
}

model DeleteClientUserResponseBody = {
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
}

model DeleteClientUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClientUserResponseBody(name='body'),
}

/**
 * @summary 删除自定义身份源指定用户
 *
 * @param request DeleteClientUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClientUserResponse
 */
async function deleteClientUserWithOptions(request: DeleteClientUserRequest, runtime: $RuntimeOptions): DeleteClientUserResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteClientUser',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除自定义身份源指定用户
 *
 * @param request DeleteClientUserRequest
 * @return DeleteClientUserResponse
 */
async function deleteClientUser(request: DeleteClientUserRequest): DeleteClientUserResponse {
  var runtime = new $RuntimeOptions{};
  return deleteClientUserWithOptions(request, runtime);
}

model DeleteDynamicRouteRequest {
  dynamicRouteId?: string(name='DynamicRouteId', description='This parameter is required.', example='dr-ca9fddfac7c6****'),
}

model DeleteDynamicRouteResponseBody = {
  requestId?: string(name='RequestId', example='748CFDC7-1EB6-5B8B-9405-DA76ED5BB60D'),
}

model DeleteDynamicRouteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDynamicRouteResponseBody(name='body'),
}

/**
 * @summary 删除动态路由
 *
 * @param request DeleteDynamicRouteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDynamicRouteResponse
 */
async function deleteDynamicRouteWithOptions(request: DeleteDynamicRouteRequest, runtime: $RuntimeOptions): DeleteDynamicRouteResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.dynamicRouteId)) {
    query['DynamicRouteId'] = request.dynamicRouteId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteDynamicRoute',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除动态路由
 *
 * @param request DeleteDynamicRouteRequest
 * @return DeleteDynamicRouteResponse
 */
async function deleteDynamicRoute(request: DeleteDynamicRouteRequest): DeleteDynamicRouteResponse {
  var runtime = new $RuntimeOptions{};
  return deleteDynamicRouteWithOptions(request, runtime);
}

model DeleteIdpDepartmentRequest {
  departmentId?: string(name='DepartmentId', description='This parameter is required.', example='10829'),
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='507'),
}

model DeleteIdpDepartmentResponseBody = {
  requestId?: string(name='RequestId', example='FEF1144C-95D1-5F7C-81EF-9DB70EA49FCE'),
}

model DeleteIdpDepartmentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteIdpDepartmentResponseBody(name='body'),
}

/**
 * @summary 删除指定自定义身份源部门
 *
 * @param request DeleteIdpDepartmentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteIdpDepartmentResponse
 */
async function deleteIdpDepartmentWithOptions(request: DeleteIdpDepartmentRequest, runtime: $RuntimeOptions): DeleteIdpDepartmentResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.departmentId)) {
    query['DepartmentId'] = request.departmentId;
  }
  if (!$isNull(request.idpConfigId)) {
    query['IdpConfigId'] = request.idpConfigId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteIdpDepartment',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除指定自定义身份源部门
 *
 * @param request DeleteIdpDepartmentRequest
 * @return DeleteIdpDepartmentResponse
 */
async function deleteIdpDepartment(request: DeleteIdpDepartmentRequest): DeleteIdpDepartmentResponse {
  var runtime = new $RuntimeOptions{};
  return deleteIdpDepartmentWithOptions(request, runtime);
}

model DeletePrivateAccessApplicationRequest {
  applicationId?: string(name='ApplicationId', description='This parameter is required.', example='pa-application-e12860ef6c48****'),
}

model DeletePrivateAccessApplicationResponseBody = {
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model DeletePrivateAccessApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePrivateAccessApplicationResponseBody(name='body'),
}

/**
 * @summary 删除内网访问应用
 *
 * @param request DeletePrivateAccessApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePrivateAccessApplicationResponse
 */
async function deletePrivateAccessApplicationWithOptions(request: DeletePrivateAccessApplicationRequest, runtime: $RuntimeOptions): DeletePrivateAccessApplicationResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.applicationId)) {
    body['ApplicationId'] = request.applicationId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeletePrivateAccessApplication',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除内网访问应用
 *
 * @param request DeletePrivateAccessApplicationRequest
 * @return DeletePrivateAccessApplicationResponse
 */
async function deletePrivateAccessApplication(request: DeletePrivateAccessApplicationRequest): DeletePrivateAccessApplicationResponse {
  var runtime = new $RuntimeOptions{};
  return deletePrivateAccessApplicationWithOptions(request, runtime);
}

model DeletePrivateAccessPolicyRequest {
  policyId?: string(name='PolicyId', description='This parameter is required.', example='pa-policy-867ef4007c8a****'),
}

model DeletePrivateAccessPolicyResponseBody = {
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
}

model DeletePrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 删除内网访问策略
 *
 * @param request DeletePrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePrivateAccessPolicyResponse
 */
async function deletePrivateAccessPolicyWithOptions(request: DeletePrivateAccessPolicyRequest, runtime: $RuntimeOptions): DeletePrivateAccessPolicyResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.policyId)) {
    body['PolicyId'] = request.policyId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeletePrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除内网访问策略
 *
 * @param request DeletePrivateAccessPolicyRequest
 * @return DeletePrivateAccessPolicyResponse
 */
async function deletePrivateAccessPolicy(request: DeletePrivateAccessPolicyRequest): DeletePrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return deletePrivateAccessPolicyWithOptions(request, runtime);
}

model DeletePrivateAccessTagRequest {
  tagId?: string(name='TagId', description='This parameter is required.', example='tag-d3f64e8bdd4a****'),
}

model DeletePrivateAccessTagResponseBody = {
  requestId?: string(name='RequestId', example='FD724DBC-CD76-5235-BF76-59C51B73296D'),
}

model DeletePrivateAccessTagResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePrivateAccessTagResponseBody(name='body'),
}

/**
 * @summary 删除内网访问标签
 *
 * @param request DeletePrivateAccessTagRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePrivateAccessTagResponse
 */
async function deletePrivateAccessTagWithOptions(request: DeletePrivateAccessTagRequest, runtime: $RuntimeOptions): DeletePrivateAccessTagResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.tagId)) {
    body['TagId'] = request.tagId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeletePrivateAccessTag',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除内网访问标签
 *
 * @param request DeletePrivateAccessTagRequest
 * @return DeletePrivateAccessTagResponse
 */
async function deletePrivateAccessTag(request: DeletePrivateAccessTagRequest): DeletePrivateAccessTagResponse {
  var runtime = new $RuntimeOptions{};
  return deletePrivateAccessTagWithOptions(request, runtime);
}

model DeleteRegistrationPoliciesRequest {
  policyIds?: [ string ](name='PolicyIds', description='This parameter is required.'),
}

model DeleteRegistrationPoliciesResponseBody = {
  requestId?: string(name='RequestId', example='D6707286-A50E-57B1-B2CF-EFAC59E850D8'),
}

model DeleteRegistrationPoliciesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRegistrationPoliciesResponseBody(name='body'),
}

/**
 * @summary 删除设备注册策略
 *
 * @param request DeleteRegistrationPoliciesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRegistrationPoliciesResponse
 */
async function deleteRegistrationPoliciesWithOptions(request: DeleteRegistrationPoliciesRequest, runtime: $RuntimeOptions): DeleteRegistrationPoliciesResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.policyIds)) {
    bodyFlat['PolicyIds'] = request.policyIds;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteRegistrationPolicies',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除设备注册策略
 *
 * @param request DeleteRegistrationPoliciesRequest
 * @return DeleteRegistrationPoliciesResponse
 */
async function deleteRegistrationPolicies(request: DeleteRegistrationPoliciesRequest): DeleteRegistrationPoliciesResponse {
  var runtime = new $RuntimeOptions{};
  return deleteRegistrationPoliciesWithOptions(request, runtime);
}

model DeleteUserDevicesRequest {
  deviceTags?: [ string ](name='DeviceTags'),
}

model DeleteUserDevicesResponseBody = {
  requestId?: string(name='RequestId', example='5FEF5CFA-14CC-5DE5-BD1F-AFFE0996E71D'),
}

model DeleteUserDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserDevicesResponseBody(name='body'),
}

/**
 * @summary 批量删除用户非在线设备
 *
 * @param request DeleteUserDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserDevicesResponse
 */
async function deleteUserDevicesWithOptions(request: DeleteUserDevicesRequest, runtime: $RuntimeOptions): DeleteUserDevicesResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.deviceTags)) {
    bodyFlat['DeviceTags'] = request.deviceTags;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteUserDevices',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量删除用户非在线设备
 *
 * @param request DeleteUserDevicesRequest
 * @return DeleteUserDevicesResponse
 */
async function deleteUserDevices(request: DeleteUserDevicesRequest): DeleteUserDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return deleteUserDevicesWithOptions(request, runtime);
}

model DeleteUserGroupRequest {
  userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='usergroup-6f1ef2fc56b6****'),
}

model DeleteUserGroupResponseBody = {
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model DeleteUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserGroupResponseBody(name='body'),
}

/**
 * @summary 删除用户组
 *
 * @param request DeleteUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserGroupResponse
 */
async function deleteUserGroupWithOptions(request: DeleteUserGroupRequest, runtime: $RuntimeOptions): DeleteUserGroupResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteUserGroup',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除用户组
 *
 * @param request DeleteUserGroupRequest
 * @return DeleteUserGroupResponse
 */
async function deleteUserGroup(request: DeleteUserGroupRequest): DeleteUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return deleteUserGroupWithOptions(request, runtime);
}

model DetachApplication2ConnectorRequest {
  applicationIds?: [ string ](name='ApplicationIds', description='This parameter is required.'),
  connectorId?: string(name='ConnectorId', description='ConnectorID。

This parameter is required.', example='connector-94db94e06b98****'),
}

model DetachApplication2ConnectorShrinkRequest {
  applicationIdsShrink?: string(name='ApplicationIds', description='This parameter is required.'),
  connectorId?: string(name='ConnectorId', description='ConnectorID。

This parameter is required.', example='connector-94db94e06b98****'),
}

model DetachApplication2ConnectorResponseBody = {
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
}

model DetachApplication2ConnectorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachApplication2ConnectorResponseBody(name='body'),
}

/**
 * @summary 卸载connector的应用
 *
 * @param tmpReq DetachApplication2ConnectorRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachApplication2ConnectorResponse
 */
async function detachApplication2ConnectorWithOptions(tmpReq: DetachApplication2ConnectorRequest, runtime: $RuntimeOptions): DetachApplication2ConnectorResponse {
  tmpReq.validate();
  var request = new DetachApplication2ConnectorShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.applicationIds)) {
    request.applicationIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.applicationIds, 'ApplicationIds', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.applicationIdsShrink)) {
    body['ApplicationIds'] = request.applicationIdsShrink;
  }
  if (!$isNull(request.connectorId)) {
    body['ConnectorId'] = request.connectorId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DetachApplication2Connector',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 卸载connector的应用
 *
 * @param request DetachApplication2ConnectorRequest
 * @return DetachApplication2ConnectorResponse
 */
async function detachApplication2Connector(request: DetachApplication2ConnectorRequest): DetachApplication2ConnectorResponse {
  var runtime = new $RuntimeOptions{};
  return detachApplication2ConnectorWithOptions(request, runtime);
}

model DetachPolicy2ApprovalProcessRequest {
  policyId?: string(name='PolicyId', description='This parameter is required.', example='ladp-27a4fedf5e73****'),
  policyType?: string(name='PolicyType', description='This parameter is required.', example='PeripheralBlock'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='approval-process-2677fcf063f5****'),
}

model DetachPolicy2ApprovalProcessResponseBody = {
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model DetachPolicy2ApprovalProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachPolicy2ApprovalProcessResponseBody(name='body'),
}

/**
 * @summary 解绑业务策略与审批流程
 *
 * @param request DetachPolicy2ApprovalProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachPolicy2ApprovalProcessResponse
 */
async function detachPolicy2ApprovalProcessWithOptions(request: DetachPolicy2ApprovalProcessRequest, runtime: $RuntimeOptions): DetachPolicy2ApprovalProcessResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.policyId)) {
    body['PolicyId'] = request.policyId;
  }
  if (!$isNull(request.policyType)) {
    body['PolicyType'] = request.policyType;
  }
  if (!$isNull(request.processId)) {
    body['ProcessId'] = request.processId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DetachPolicy2ApprovalProcess',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解绑业务策略与审批流程
 *
 * @param request DetachPolicy2ApprovalProcessRequest
 * @return DetachPolicy2ApprovalProcessResponse
 */
async function detachPolicy2ApprovalProcess(request: DetachPolicy2ApprovalProcessRequest): DetachPolicy2ApprovalProcessResponse {
  var runtime = new $RuntimeOptions{};
  return detachPolicy2ApprovalProcessWithOptions(request, runtime);
}

model ExportUserDevicesRequest {
  appStatuses?: [ string ](name='AppStatuses'),
  department?: string(name='Department'),
  deviceBelong?: string(name='DeviceBelong', example='Company'),
  deviceStatuses?: [ string ](name='DeviceStatuses'),
  deviceTags?: [ string ](name='DeviceTags'),
  deviceTypes?: [ string ](name='DeviceTypes'),
  dlpStatuses?: [ string ](name='DlpStatuses'),
  hostname?: string(name='Hostname', example='win10-64bit'),
  iaStatuses?: [ string ](name='IaStatuses'),
  mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
  nacStatuses?: [ string ](name='NacStatuses'),
  paStatuses?: [ string ](name='PaStatuses'),
  saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
  sharingStatus?: boolean(name='SharingStatus', example='true'),
  username?: string(name='Username'),
}

model ExportUserDevicesResponseBody = {
  requestId?: string(name='RequestId', example='748CFDC7-1EB6-5B8B-9405-DA76ED5BB60D'),
  signedUrl?: string(name='SignedUrl', example='https://sase-export.oss-cn-hangzhou.aliyuncs.com/export%2Fapp-device%2F20240607154831.xlsx?Expires=1717746571&OSSAccessKeyId=********************'),
}

model ExportUserDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportUserDevicesResponseBody(name='body'),
}

/**
 * @summary 批量查询用户设备列表
 *
 * @param request ExportUserDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportUserDevicesResponse
 */
async function exportUserDevicesWithOptions(request: ExportUserDevicesRequest, runtime: $RuntimeOptions): ExportUserDevicesResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.appStatuses)) {
    bodyFlat['AppStatuses'] = request.appStatuses;
  }
  if (!$isNull(request.department)) {
    body['Department'] = request.department;
  }
  if (!$isNull(request.deviceBelong)) {
    body['DeviceBelong'] = request.deviceBelong;
  }
  if (!$isNull(request.deviceStatuses)) {
    bodyFlat['DeviceStatuses'] = request.deviceStatuses;
  }
  if (!$isNull(request.deviceTags)) {
    bodyFlat['DeviceTags'] = request.deviceTags;
  }
  if (!$isNull(request.deviceTypes)) {
    bodyFlat['DeviceTypes'] = request.deviceTypes;
  }
  if (!$isNull(request.dlpStatuses)) {
    bodyFlat['DlpStatuses'] = request.dlpStatuses;
  }
  if (!$isNull(request.hostname)) {
    body['Hostname'] = request.hostname;
  }
  if (!$isNull(request.iaStatuses)) {
    bodyFlat['IaStatuses'] = request.iaStatuses;
  }
  if (!$isNull(request.mac)) {
    body['Mac'] = request.mac;
  }
  if (!$isNull(request.nacStatuses)) {
    bodyFlat['NacStatuses'] = request.nacStatuses;
  }
  if (!$isNull(request.paStatuses)) {
    bodyFlat['PaStatuses'] = request.paStatuses;
  }
  if (!$isNull(request.saseUserId)) {
    body['SaseUserId'] = request.saseUserId;
  }
  if (!$isNull(request.sharingStatus)) {
    body['SharingStatus'] = request.sharingStatus;
  }
  if (!$isNull(request.username)) {
    body['Username'] = request.username;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ExportUserDevices',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询用户设备列表
 *
 * @param request ExportUserDevicesRequest
 * @return ExportUserDevicesResponse
 */
async function exportUserDevices(request: ExportUserDevicesRequest): ExportUserDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return exportUserDevicesWithOptions(request, runtime);
}

model GetActiveIdpConfigResponseBody = {
  data?: {
    description?: string(name='Description'),
    id?: string(name='Id', example='idp-cfg001'),
    name?: string(name='Name'),
    type?: string(name='Type', example='DingTalk'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
}

model GetActiveIdpConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetActiveIdpConfigResponseBody(name='body'),
}

/**
 * @summary 查询已启用的身份源配置
 *
 * @param request GetActiveIdpConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetActiveIdpConfigResponse
 */
async function getActiveIdpConfigWithOptions(runtime: $RuntimeOptions): GetActiveIdpConfigResponse {
  var req = new OpenApiUtil.OpenApiRequest{};
  var params = new OpenApiUtil.Params{
    action = 'GetActiveIdpConfig',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询已启用的身份源配置
 *
 * @return GetActiveIdpConfigResponse
 */
async function getActiveIdpConfig(): GetActiveIdpConfigResponse {
  var runtime = new $RuntimeOptions{};
  return getActiveIdpConfigWithOptions(runtime);
}

model GetApprovalRequest {
  approvalId?: string(name='ApprovalId', description='This parameter is required.', example='approval-872b5e911b35****'),
}

model GetApprovalResponseBody = {
  approval?: [ 
    {
      approvalDetail?: string(name='ApprovalDetail'),
      approvalId?: string(name='ApprovalId', example='approval-3564b140642f****'),
      approvalProgresses?: [ 
        {
          action?: string(name='Action', example='Approve'),
          comment?: string(name='Comment'),
          executor?: string(name='Executor', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
          operators?: [ 
            {
              saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
              username?: string(name='Username'),
            }
          ](name='Operators'),
          status?: string(name='Status', example='Approved'),
          timestamp?: long(name='Timestamp', example='1736752000'),
        }
      ](name='ApprovalProgresses'),
      createTime?: string(name='CreateTime', example='2022-11-15 22:11:55'),
      creatorDepartment?: string(name='CreatorDepartment'),
      creatorDevTag?: string(name='CreatorDevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      creatorUserId?: string(name='CreatorUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      creatorUsername?: string(name='CreatorUsername'),
      endTimestamp?: long(name='EndTimestamp', example='1757952000'),
      policyType?: string(name='PolicyType', example='DlpSend'),
      processId?: string(name='ProcessId', example='approval-process-fcc351b8a95b****'),
      processName?: string(name='ProcessName'),
      reason?: string(name='Reason'),
      schemaContent?: string(name='SchemaContent', example='{"form": {"labelCol": 6,"wrapperCol": 12}}'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      schemaName?: string(name='SchemaName'),
      status?: string(name='Status', example='Pending'),
    }
  ](name='Approval'),
  requestId?: string(name='RequestId', example='7E9D7ACD-53D5-56EF-A913-79D148D06299'),
}

model GetApprovalResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetApprovalResponseBody(name='body'),
}

/**
 * @summary 查询审批
 *
 * @param request GetApprovalRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetApprovalResponse
 */
async function getApprovalWithOptions(request: GetApprovalRequest, runtime: $RuntimeOptions): GetApprovalResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetApproval',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询审批
 *
 * @param request GetApprovalRequest
 * @return GetApprovalResponse
 */
async function getApproval(request: GetApprovalRequest): GetApprovalResponse {
  var runtime = new $RuntimeOptions{};
  return getApprovalWithOptions(request, runtime);
}

model GetApprovalProcessRequest {
  processId?: string(name='ProcessId', description='This parameter is required.', example='approval-process-fcc351b8a95b****'),
}

model GetApprovalProcessResponseBody = {
  process?: {
    appUninstallPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='AppUninstallPolicies'),
    createTime?: string(name='CreateTime', example='2022-10-25 10:44:09'),
    description?: string(name='Description'),
    deviceRegistrationPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DeviceRegistrationPolicies'),
    dlpSendPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DlpSendPolicies'),
    domainBlacklistPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DomainBlacklistPolicies'),
    domainWhitelistPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DomainWhitelistPolicies'),
    endpointHardeningPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId'),
    }(name='EndpointHardeningPolicies'),
    peripheralBlockPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='PeripheralBlockPolicies'),
    processId?: string(name='ProcessId', example='approval-process-35ee09077ee9****'),
    processName?: string(name='ProcessName'),
    processNodes?: [[ 
      {
        saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
        username?: string(name='Username'),
      }
    ]    ](name='ProcessNodes'),
    softwareBlockPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='SoftwareBlockPolicies'),
    softwareHardeningPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId'),
    }(name='SoftwareHardeningPolicies'),
  }(name='Process'),
  requestId?: string(name='RequestId', example='C81E0B4B-AAEB-5FDD-B27E-3F5AF7EBD7EF'),
}

model GetApprovalProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetApprovalProcessResponseBody(name='body'),
}

/**
 * @summary 查询审批流程
 *
 * @param request GetApprovalProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetApprovalProcessResponse
 */
async function getApprovalProcessWithOptions(request: GetApprovalProcessRequest, runtime: $RuntimeOptions): GetApprovalProcessResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetApprovalProcess',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询审批流程
 *
 * @param request GetApprovalProcessRequest
 * @return GetApprovalProcessResponse
 */
async function getApprovalProcess(request: GetApprovalProcessRequest): GetApprovalProcessResponse {
  var runtime = new $RuntimeOptions{};
  return getApprovalProcessWithOptions(request, runtime);
}

model GetApprovalSchemaRequest {
  schemaId?: string(name='SchemaId', description='This parameter is required.', example='approval-schema-090134f1ebff****'),
}

model GetApprovalSchemaResponseBody = {
  requestId?: string(name='RequestId', example='EFE7EBB2-449D-5BBB-B381-CA7839BC1649'),
  schema?: {
    createTime?: string(name='CreateTime', example='2022-02-14 11:57:51'),
    description?: string(name='Description'),
    isDefault?: boolean(name='IsDefault', example='true'),
    policyType?: string(name='PolicyType', example='DlpSend'),
    schemaContent?: string(name='SchemaContent', example='{"form": {"labelCol": 6,"wrapperCol": 12}}'),
    schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    schemaName?: string(name='SchemaName'),
    schemaVersion?: long(name='SchemaVersion', example='1715680940'),
  }(name='Schema'),
}

model GetApprovalSchemaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetApprovalSchemaResponseBody(name='body'),
}

/**
 * @summary 查询审批动态模板
 *
 * @param request GetApprovalSchemaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetApprovalSchemaResponse
 */
async function getApprovalSchemaWithOptions(request: GetApprovalSchemaRequest, runtime: $RuntimeOptions): GetApprovalSchemaResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetApprovalSchema',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询审批动态模板
 *
 * @param request GetApprovalSchemaRequest
 * @return GetApprovalSchemaResponse
 */
async function getApprovalSchema(request: GetApprovalSchemaRequest): GetApprovalSchemaResponse {
  var runtime = new $RuntimeOptions{};
  return getApprovalSchemaWithOptions(request, runtime);
}

model GetBootAndAntiUninstallPolicyResponseBody = {
  requestId?: string(name='RequestId', example='CB67D866-1E54-5106-89DF-6D70C73E5989'),
  strategy?: {
    allowReport?: boolean(name='AllowReport', example='true'),
    blockContent?: {
      blockTextEn?: {
        content?: string(name='Content', example='After uninstalling, the device can no longer be used for company work, and it will lose access to the company\\\\"s intranet!'),
        mainButtonText?: string(name='MainButtonText', example='Report'),
        minorButtonText?: string(name='MinorButtonText', example='Ignore'),
        title?: string(name='Title', example='Anti-Uninstall Warning'),
      }(name='BlockTextEn'),
      blockTextZh?: {
        content?: string(name='Content'),
        mainButtonText?: string(name='MainButtonText'),
        minorButtonText?: string(name='MinorButtonText'),
        title?: string(name='Title'),
      }(name='BlockTextZh'),
    }(name='BlockContent'),
    createTime?: string(name='CreateTime', example='2023-04-16 10:50:05'),
    isAntiUninstall?: boolean(name='IsAntiUninstall', example='true'),
    isBoot?: boolean(name='IsBoot', example='true'),
    policyId?: string(name='PolicyId', example='auto-boot-anti-uninstall-6f6cbf5f6605****'),
    reportProcessId?: string(name='ReportProcessId', example='approval-process-300abfb970cc****'),
    updateTime?: string(name='UpdateTime', example='2024-06-14 10:17:14'),
    userGroupIds?: [ string ](name='UserGroupIds'),
    whitelistUsers?: [ string ](name='WhitelistUsers'),
  }(name='Strategy'),
}

model GetBootAndAntiUninstallPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBootAndAntiUninstallPolicyResponseBody(name='body'),
}

/**
 * @summary 查询自启动与防卸载策略配置
 *
 * @param request GetBootAndAntiUninstallPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBootAndAntiUninstallPolicyResponse
 */
async function getBootAndAntiUninstallPolicyWithOptions(runtime: $RuntimeOptions): GetBootAndAntiUninstallPolicyResponse {
  var req = new OpenApiUtil.OpenApiRequest{};
  var params = new OpenApiUtil.Params{
    action = 'GetBootAndAntiUninstallPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自启动与防卸载策略配置
 *
 * @return GetBootAndAntiUninstallPolicyResponse
 */
async function getBootAndAntiUninstallPolicy(): GetBootAndAntiUninstallPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return getBootAndAntiUninstallPolicyWithOptions(runtime);
}

model GetClientUserRequest {
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='598'),
  username?: string(name='Username', description='This parameter is required.'),
}

model GetClientUserResponseBody = {
  data?: {
    department?: {
      id?: string(name='Id', example='107'),
      name?: string(name='Name'),
    }(name='Department'),
    departmentId?: string(name='DepartmentId', example='10713'),
    description?: string(name='Description'),
    email?: string(name='Email', example='johndoe@example.com'),
    id?: string(name='Id', example='83'),
    idpConfigId?: string(name='IdpConfigId', example='598'),
    mobileNumber?: string(name='MobileNumber', example='13641966835'),
    status?: string(name='Status', example='Disabled'),
    userId?: string(name='UserId', example='su_abcd7215****'),
    username?: string(name='Username'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model GetClientUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClientUserResponseBody(name='body'),
}

/**
 * @summary 查询自定义身份源指定用户
 *
 * @param request GetClientUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClientUserResponse
 */
async function getClientUserWithOptions(request: GetClientUserRequest, runtime: $RuntimeOptions): GetClientUserResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetClientUser',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自定义身份源指定用户
 *
 * @param request GetClientUserRequest
 * @return GetClientUserResponse
 */
async function getClientUser(request: GetClientUserRequest): GetClientUserResponse {
  var runtime = new $RuntimeOptions{};
  return getClientUserWithOptions(request, runtime);
}

model GetDynamicRouteRequest {
  dynamicRouteId?: string(name='DynamicRouteId', description='This parameter is required.', example='dr-16ff07c8207d****'),
}

model GetDynamicRouteResponseBody = {
  dynamicRoute?: {
    applicationIds?: [ string ](name='ApplicationIds'),
    applicationType?: string(name='ApplicationType', example='Application'),
    createTime?: string(name='CreateTime', example='2023-02-09 10:31:47'),
    description?: string(name='Description'),
    dynamicRouteId?: string(name='DynamicRouteId', example='dr-16ff07c8207d****'),
    dynamicRouteType?: string(name='DynamicRouteType', example='connector'),
    name?: string(name='Name', example='dynamic_route_name'),
    nextHop?: string(name='NextHop', example='connector-8ccb13b6f52c****'),
    priority?: int32(name='Priority', example='1'),
    regionIds?: [ string ](name='RegionIds'),
    status?: string(name='Status', example='Enabled'),
    tagIds?: [ string ](name='TagIds'),
  }(name='DynamicRoute'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model GetDynamicRouteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDynamicRouteResponseBody(name='body'),
}

/**
 * @summary 查询动态路由详情
 *
 * @param request GetDynamicRouteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDynamicRouteResponse
 */
async function getDynamicRouteWithOptions(request: GetDynamicRouteRequest, runtime: $RuntimeOptions): GetDynamicRouteResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetDynamicRoute',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询动态路由详情
 *
 * @param request GetDynamicRouteRequest
 * @return GetDynamicRouteResponse
 */
async function getDynamicRoute(request: GetDynamicRouteRequest): GetDynamicRouteResponse {
  var runtime = new $RuntimeOptions{};
  return getDynamicRouteWithOptions(request, runtime);
}

model GetIdpConfigRequest {
  id?: string(name='Id', description='This parameter is required.', example='1465'),
}

model GetIdpConfigResponseBody = {
  data?: {
    accessKey?: string(name='AccessKey', description='AccessKey ID', example='LTAI5tJVztnh6Nn***'),
    accessKeySecret?: string(name='AccessKeySecret', description='AccessKey Secret', example='E75ktr5jENiR3ssjC***'),
    description?: string(name='Description'),
    getGroupUrl?: string(name='GetGroupUrl', example='https://172.10.10.2:4321/getGroup?name=%s&pass=%s'),
    id?: string(name='Id', example='1465'),
    idpMetadata?: string(name='IdpMetadata', example='<?xml version="1.0" encoding="utf-8"?>***'),
    mfaConfigType?: string(name='MfaConfigType', example='totp'),
    mobileLoginType?: string(name='MobileLoginType', example='password'),
    mobileMfaConfigType?: string(name='MobileMfaConfigType', example='totp'),
    multiIdpInfo?: string(name='MultiIdpInfo', example='1482,1355'),
    name?: string(name='Name'),
    pcLoginType?: string(name='PcLoginType', example='password'),
    status?: string(name='Status', example='Enabled'),
    type?: string(name='Type', example='CSAS'),
    updateTime?: string(name='UpdateTime', example='2024-02-26T02:02:42Z'),
    verifyAesKey?: string(name='VerifyAesKey', example='QVhaU0RDR0JIWVV***'),
    verifyToken?: string(name='VerifyToken', example='7JAr3fYtnl***'),
    verifyUrl?: string(name='VerifyUrl', example='http://172.10.10.1:1234/otp_verify'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model GetIdpConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetIdpConfigResponseBody(name='body'),
}

/**
 * @summary 查询身份源配置详情
 *
 * @param request GetIdpConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetIdpConfigResponse
 */
async function getIdpConfigWithOptions(request: GetIdpConfigRequest, runtime: $RuntimeOptions): GetIdpConfigResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetIdpConfig',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询身份源配置详情
 *
 * @param request GetIdpConfigRequest
 * @return GetIdpConfigResponse
 */
async function getIdpConfig(request: GetIdpConfigRequest): GetIdpConfigResponse {
  var runtime = new $RuntimeOptions{};
  return getIdpConfigWithOptions(request, runtime);
}

model GetPrivateAccessApplicationRequest {
  applicationId?: string(name='ApplicationId', description='This parameter is required.', example='pa-application-e12860ef6c48****'),
}

model GetPrivateAccessApplicationResponseBody = {
  application?: {
    addresses?: [ string ](name='Addresses'),
    applicationId?: string(name='ApplicationId', example='pa-application-e12860ef6c48****'),
    browserAccessStatus?: string(name='BrowserAccessStatus'),
    connectorIds?: [ string ](name='ConnectorIds'),
    createTime?: string(name='CreateTime', example='2022-08-30 16:50:32'),
    description?: string(name='Description'),
    l7Config?: PAL7Config(name='L7Config'),
    l7ProxyDomainAutomatic?: string(name='L7ProxyDomainAutomatic'),
    l7ProxyDomainCustom?: string(name='L7ProxyDomainCustom'),
    name?: string(name='Name', example='private_access_application_name'),
    policyIds?: [ string ](name='PolicyIds'),
    portRanges?: [ 
      {
        begin?: int32(name='Begin', example='80'),
        end?: int32(name='End', example='81'),
      }
    ](name='PortRanges'),
    protocol?: string(name='Protocol', example='All'),
    status?: string(name='Status', example='Enabled'),
    tagIds?: [ string ](name='TagIds'),
  }(name='Application'),
  requestId?: string(name='RequestId', example='3ACC5EDC-2B7D-5032-8C58-D7615D66C1D4'),
}

model GetPrivateAccessApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPrivateAccessApplicationResponseBody(name='body'),
}

/**
 * @summary 查询内网访问应用详情
 *
 * @param request GetPrivateAccessApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPrivateAccessApplicationResponse
 */
async function getPrivateAccessApplicationWithOptions(request: GetPrivateAccessApplicationRequest, runtime: $RuntimeOptions): GetPrivateAccessApplicationResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPrivateAccessApplication',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询内网访问应用详情
 *
 * @param request GetPrivateAccessApplicationRequest
 * @return GetPrivateAccessApplicationResponse
 */
async function getPrivateAccessApplication(request: GetPrivateAccessApplicationRequest): GetPrivateAccessApplicationResponse {
  var runtime = new $RuntimeOptions{};
  return getPrivateAccessApplicationWithOptions(request, runtime);
}

model GetPrivateAccessPolicyRequest {
  policyId?: string(name='PolicyId', description='This parameter is required.', example='pa-policy-63b2f1844b86****'),
}

model GetPrivateAccessPolicyResponseBody = {
  policy?: {
    applicationIds?: [ string ](name='ApplicationIds'),
    applicationType?: string(name='ApplicationType', example='Application'),
    createTime?: string(name='CreateTime', example='2021-07-29 11:26:02'),
    customUserAttributes?: [ 
      {
        idpId?: int32(name='IdpId', example='12'),
        relation?: string(name='Relation', example='Equal'),
        userGroupType?: string(name='UserGroupType', example='department'),
        value?: string(name='Value'),
      }
    ](name='CustomUserAttributes'),
    description?: string(name='Description'),
    deviceAttributeAction?: string(name='DeviceAttributeAction'),
    deviceAttributeId?: string(name='DeviceAttributeId'),
    name?: string(name='Name', example='private_access_policy_name'),
    policyAction?: string(name='PolicyAction', example='Allow'),
    policyId?: string(name='PolicyId', example='pa-policy-63b2f1844b86****'),
    priority?: int32(name='Priority', example='1'),
    status?: string(name='Status', example='Enabled'),
    tagIds?: [ string ](name='TagIds'),
    triggerTemplateId?: string(name='TriggerTemplateId'),
    userGroupIds?: [ string ](name='UserGroupIds'),
    userGroupMode?: string(name='UserGroupMode', example='Normal'),
  }(name='Policy'),
  requestId?: string(name='RequestId', example='7E9D7ACD-53D5-56EF-A913-79D148D06299'),
}

model GetPrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetPrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 查询内网访问策略详情
 *
 * @param request GetPrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetPrivateAccessPolicyResponse
 */
async function getPrivateAccessPolicyWithOptions(request: GetPrivateAccessPolicyRequest, runtime: $RuntimeOptions): GetPrivateAccessPolicyResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetPrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询内网访问策略详情
 *
 * @param request GetPrivateAccessPolicyRequest
 * @return GetPrivateAccessPolicyResponse
 */
async function getPrivateAccessPolicy(request: GetPrivateAccessPolicyRequest): GetPrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return getPrivateAccessPolicyWithOptions(request, runtime);
}

model GetRegistrationPolicyRequest {
  policyId?: string(name='PolicyId', description='This parameter is required.', example='reg-policy-dcbfd33cb004****'),
}

model GetRegistrationPolicyResponseBody = {
  createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
  description?: string(name='Description'),
  limitDetail?: [ 
    {
      deviceBelong?: string(name='DeviceBelong', example='Personal'),
      limitCount?: {
        all?: int32(name='All', example='0'),
        mobile?: int32(name='Mobile', example='2'),
        PC?: int32(name='PC', example='2'),
      }(name='LimitCount'),
      limitType?: string(name='LimitType', example='LimitDiff'),
    }
  ](name='LimitDetail'),
  matchMode?: string(name='MatchMode', example='UserGroupAll'),
  name?: string(name='Name', example='registration_policy_name'),
  policyId?: string(name='PolicyId', example='reg-policy-dcbfd33cb004****'),
  priority?: long(name='Priority', example='99'),
  requestId?: string(name='RequestId', example='47363C2B-1AAA-5954-8847-0E50FCC54117'),
  status?: string(name='Status', example='Enabled'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelist?: [ string ](name='Whitelist'),
}

model GetRegistrationPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetRegistrationPolicyResponseBody(name='body'),
}

/**
 * @summary 查询设备注册策略详情
 *
 * @param request GetRegistrationPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetRegistrationPolicyResponse
 */
async function getRegistrationPolicyWithOptions(request: GetRegistrationPolicyRequest, runtime: $RuntimeOptions): GetRegistrationPolicyResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetRegistrationPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询设备注册策略详情
 *
 * @param request GetRegistrationPolicyRequest
 * @return GetRegistrationPolicyResponse
 */
async function getRegistrationPolicy(request: GetRegistrationPolicyRequest): GetRegistrationPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return getRegistrationPolicyWithOptions(request, runtime);
}

model GetUserDeviceRequest {
  deviceTag?: string(name='DeviceTag', description='This parameter is required.', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
}

model GetUserDeviceResponseBody = {
  device?: {
    appStatus?: string(name='AppStatus', example='Online'),
    appVersion?: string(name='AppVersion', example='2.2.0'),
    CPU?: string(name='CPU', example='Apple M1'),
    createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
    department?: string(name='Department'),
    deviceBelong?: string(name='DeviceBelong', example='Company'),
    deviceModel?: string(name='DeviceModel', example='MacBookPro17,1'),
    deviceStatus?: string(name='DeviceStatus', example='Online'),
    deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
    deviceType?: string(name='DeviceType', example='Windows'),
    deviceVersion?: string(name='DeviceVersion', example='3.5.1'),
    disk?: string(name='Disk', example='APPLE SSD AP0512Q Media'),
    dlpStatus?: string(name='DlpStatus', example='Unauthorized'),
    edrStatus?: string(name='EdrStatus'),
    historyUsers?: [ 
      {
        saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
        username?: string(name='Username'),
      }
    ](name='HistoryUsers'),
    hostname?: string(name='Hostname', example='win10-64bit'),
    iaStatus?: string(name='IaStatus', example='Disabled'),
    innerIP?: string(name='InnerIP', example='172.16.XX.XX'),
    mac?: string(name='Mac', example='48:9e:XX:XX:02:80'),
    memory?: string(name='Memory', example='16'),
    nacStatus?: string(name='NacStatus', example='Unprovisioned'),
    netInterfaceInfo?: [ 
      {
        mac?: string(name='Mac'),
        name?: string(name='Name'),
      }
    ](name='NetInterfaceInfo'),
    paStatus?: string(name='PaStatus', example='Enabled'),
    saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
    sharingStatus?: boolean(name='SharingStatus', example='true'),
    srcIP?: string(name='SrcIP', example='106.14.XX.XX'),
    updateTime?: string(name='UpdateTime', example='2023-08-24 19:04:42'),
    username?: string(name='Username'),
    workshop?: string(name='Workshop'),
  }(name='Device'),
  requestId?: string(name='RequestId', example='EFE7EBB2-449D-5BBB-B381-CA7839BC1649'),
}

model GetUserDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserDeviceResponseBody(name='body'),
}

/**
 * @summary 查询用户设备详情
 *
 * @param request GetUserDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserDeviceResponse
 */
async function getUserDeviceWithOptions(request: GetUserDeviceRequest, runtime: $RuntimeOptions): GetUserDeviceResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetUserDevice',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户设备详情
 *
 * @param request GetUserDeviceRequest
 * @return GetUserDeviceResponse
 */
async function getUserDevice(request: GetUserDeviceRequest): GetUserDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return getUserDeviceWithOptions(request, runtime);
}

model GetUserGroupRequest {
  userGroupId?: string(name='UserGroupId', description='This parameter is required.'),
}

model GetUserGroupResponseBody = {
  requestId?: string(name='RequestId', example='1310DBC7-7E1F-55D3-B4B4-E4BE912517FB'),
  userGroup?: {
    attributes?: [ 
      {
        idpId?: int32(name='IdpId', example='12'),
        relation?: string(name='Relation', example='Equal'),
        userGroupType?: string(name='UserGroupType', example='department'),
        value?: string(name='Value'),
      }
    ](name='Attributes'),
    createTime?: string(name='CreateTime', example='2022-10-10 11:39:22'),
    description?: string(name='Description'),
    name?: string(name='Name', example='user_group_name'),
    userGroupId?: string(name='UserGroupId'),
  }(name='UserGroup'),
}

model GetUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserGroupResponseBody(name='body'),
}

/**
 * @summary 查询用户组详情
 *
 * @param request GetUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserGroupResponse
 */
async function getUserGroupWithOptions(request: GetUserGroupRequest, runtime: $RuntimeOptions): GetUserGroupResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetUserGroup',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户组详情
 *
 * @param request GetUserGroupRequest
 * @return GetUserGroupResponse
 */
async function getUserGroup(request: GetUserGroupRequest): GetUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return getUserGroupWithOptions(request, runtime);
}

model GetWmEmbedTaskRequest {
  taskId?: string(name='TaskId', description='This parameter is required.', example='job:5GfrJYsoaffmCE7Z5bZtjU********'),
}

model GetWmEmbedTaskResponseBody = {
  data?: {
    fileUrl?: string(name='FileUrl', example='https://example.com/embed-****.pdf'),
    fileUrlExp?: string(name='FileUrlExp', example='171859****'),
    filename?: string(name='Filename', example='embed-****.pdf'),
    outFileHashMd5?: string(name='OutFileHashMd5', example='d41d8cd98f00b204e9800998ecf8****'),
    outFileSize?: long(name='OutFileSize', example='123**'),
    taskId?: string(name='TaskId', example='job:5GfrJYsoaffmCE7Z5bZtjUxxxxxxxxxx'),
    taskStatus?: string(name='TaskStatus', example='Success'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='D6707286-A50E-57B1-B2CF-EFAC59E850D8'),
}

model GetWmEmbedTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWmEmbedTaskResponseBody(name='body'),
}

/**
 * @summary 查询嵌入水印任务
 *
 * @param request GetWmEmbedTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWmEmbedTaskResponse
 */
async function getWmEmbedTaskWithOptions(request: GetWmEmbedTaskRequest, runtime: $RuntimeOptions): GetWmEmbedTaskResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetWmEmbedTask',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询嵌入水印任务
 *
 * @param request GetWmEmbedTaskRequest
 * @return GetWmEmbedTaskResponse
 */
async function getWmEmbedTask(request: GetWmEmbedTaskRequest): GetWmEmbedTaskResponse {
  var runtime = new $RuntimeOptions{};
  return getWmEmbedTaskWithOptions(request, runtime);
}

model GetWmExtractTaskRequest {
  taskId?: string(name='TaskId', description='This parameter is required.', example='wmt-9648c22d2eb2cb57bb855dcae7898464********'),
}

model GetWmExtractTaskResponseBody = {
  data?: {
    createTime?: string(name='CreateTime', example='2024-01-01 11:22:33'),
    filename?: string(name='Filename', example='test-****.pdf'),
    status?: string(name='Status', example='Success'),
    taskId?: string(name='TaskId', example='wmt-9648c22d2eb2cb57bb855dcae7898464********'),
    wmInfoBytesB64?: string(name='WmInfoBytesB64', example='aGVsbG8gc2Fz****'),
    wmInfoSize?: long(name='WmInfoSize', example='32'),
    wmInfoUint?: long(name='WmInfoUint', example='123**'),
    wmType?: string(name='WmType', example='PureDocument'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
}

model GetWmExtractTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWmExtractTaskResponseBody(name='body'),
}

/**
 * @summary 查询文件水印提取任务详情
 *
 * @param request GetWmExtractTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWmExtractTaskResponse
 */
async function getWmExtractTaskWithOptions(request: GetWmExtractTaskRequest, runtime: $RuntimeOptions): GetWmExtractTaskResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetWmExtractTask',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询文件水印提取任务详情
 *
 * @param request GetWmExtractTaskRequest
 * @return GetWmExtractTaskResponse
 */
async function getWmExtractTask(request: GetWmExtractTaskRequest): GetWmExtractTaskResponse {
  var runtime = new $RuntimeOptions{};
  return getWmExtractTaskWithOptions(request, runtime);
}

model ListApplicationsForPrivateAccessPolicyRequest {
  policyIds?: [ string ](name='PolicyIds', description='This parameter is required.'),
}

model ListApplicationsForPrivateAccessPolicyResponseBody = {
  polices?: [ 
    {
      applications?: [ 
        {
          addresses?: [ string ](name='Addresses'),
          applicationId?: string(name='ApplicationId', example='pa-application-7a9243dd02f4****'),
          createTime?: string(name='CreateTime', example='2022-09-27 18:10:25'),
          description?: string(name='Description'),
          name?: string(name='Name', example='application_name'),
          portRanges?: [ 
            {
              begin?: int32(name='Begin', example='80'),
              end?: int32(name='End', example='81'),
            }
          ](name='PortRanges'),
          protocol?: string(name='Protocol', example='TCP'),
          status?: string(name='Status', example='Enabled'),
        }
      ](name='Applications'),
      policyId?: string(name='PolicyId', example='pa-policy-1b0d0e8b4bcf****'),
    }
  ](name='Polices'),
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
}

model ListApplicationsForPrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApplicationsForPrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问策略的应用
 *
 * @param request ListApplicationsForPrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApplicationsForPrivateAccessPolicyResponse
 */
async function listApplicationsForPrivateAccessPolicyWithOptions(request: ListApplicationsForPrivateAccessPolicyRequest, runtime: $RuntimeOptions): ListApplicationsForPrivateAccessPolicyResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApplicationsForPrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问策略的应用
 *
 * @param request ListApplicationsForPrivateAccessPolicyRequest
 * @return ListApplicationsForPrivateAccessPolicyResponse
 */
async function listApplicationsForPrivateAccessPolicy(request: ListApplicationsForPrivateAccessPolicyRequest): ListApplicationsForPrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return listApplicationsForPrivateAccessPolicyWithOptions(request, runtime);
}

model ListApplicationsForPrivateAccessTagRequest {
  tagIds?: [ string ](name='TagIds', description='This parameter is required.'),
}

model ListApplicationsForPrivateAccessTagResponseBody = {
  requestId?: string(name='RequestId', example='B608C6AE-623D-55C4-9454-601B88AE937E'),
  tags?: [ 
    {
      applications?: [ 
        {
          addresses?: [ string ](name='Addresses'),
          applicationId?: string(name='ApplicationId', example='pa-application-7a9243dd02f4****'),
          createTime?: string(name='CreateTime', description='内网访问应用创建时间。', example='2022-09-27 18:10:25'),
          description?: string(name='Description'),
          name?: string(name='Name', example='private_access_application_name'),
          portRanges?: [ 
            {
              begin?: int32(name='Begin', example='80'),
              end?: int32(name='End', example='81'),
            }
          ](name='PortRanges'),
          protocol?: string(name='Protocol', example='All'),
          status?: string(name='Status', example='Enabled'),
        }
      ](name='Applications'),
      tagId?: string(name='TagId', example='tag-7ffc82853476****'),
    }
  ](name='Tags'),
}

model ListApplicationsForPrivateAccessTagResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApplicationsForPrivateAccessTagResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问标签的应用
 *
 * @param request ListApplicationsForPrivateAccessTagRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApplicationsForPrivateAccessTagResponse
 */
async function listApplicationsForPrivateAccessTagWithOptions(request: ListApplicationsForPrivateAccessTagRequest, runtime: $RuntimeOptions): ListApplicationsForPrivateAccessTagResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApplicationsForPrivateAccessTag',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问标签的应用
 *
 * @param request ListApplicationsForPrivateAccessTagRequest
 * @return ListApplicationsForPrivateAccessTagResponse
 */
async function listApplicationsForPrivateAccessTag(request: ListApplicationsForPrivateAccessTagRequest): ListApplicationsForPrivateAccessTagResponse {
  var runtime = new $RuntimeOptions{};
  return listApplicationsForPrivateAccessTagWithOptions(request, runtime);
}

model ListApprovalProcessesRequest {
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  policyId?: string(name='PolicyId', example='pid-6d6ad77d5b52****'),
  policyType?: string(name='PolicyType', example='DlpSend'),
  processIds?: [ string ](name='ProcessIds'),
  processName?: string(name='ProcessName', example='test'),
  saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
  username?: string(name='Username'),
}

model ListApprovalProcessesResponseBody = {
  processes?: [ 
    {
      appUninstallPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='AppUninstallPolicies'),
      createTime?: string(name='CreateTime', example='2024-02-27 14:04:27'),
      description?: string(name='Description'),
      deviceRegistrationPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='DeviceRegistrationPolicies'),
      dlpSendPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='DlpSendPolicies'),
      domainBlacklistPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='DomainBlacklistPolicies'),
      domainWhitelistPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='DomainWhitelistPolicies'),
      endpointHardeningPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId'),
      }(name='EndpointHardeningPolicies'),
      peripheralBlockPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='PeripheralBlockPolicies'),
      processId?: string(name='ProcessId', example='approval-process-35ee09077ee9****'),
      processName?: string(name='ProcessName'),
      processNodes?: [[ 
        {
          saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
          username?: string(name='Username'),
        }
      ]      ](name='ProcessNodes'),
      softwareBlockPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      }(name='SoftwareBlockPolicies'),
      softwareHardeningPolicies?: {
        policyIds?: [ string ](name='PolicyIds'),
        schemaId?: string(name='SchemaId'),
      }(name='SoftwareHardeningPolicies'),
    }
  ](name='Processes'),
  requestId?: string(name='RequestId', example='7E39C33B-F565-55C6-ACC2-953FCE7DA7D6'),
  totalNum?: string(name='TotalNum', example='1'),
}

model ListApprovalProcessesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApprovalProcessesResponseBody(name='body'),
}

/**
 * @summary 列表查询审批流程
 *
 * @param request ListApprovalProcessesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApprovalProcessesResponse
 */
async function listApprovalProcessesWithOptions(request: ListApprovalProcessesRequest, runtime: $RuntimeOptions): ListApprovalProcessesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApprovalProcesses',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列表查询审批流程
 *
 * @param request ListApprovalProcessesRequest
 * @return ListApprovalProcessesResponse
 */
async function listApprovalProcesses(request: ListApprovalProcessesRequest): ListApprovalProcessesResponse {
  var runtime = new $RuntimeOptions{};
  return listApprovalProcessesWithOptions(request, runtime);
}

model ListApprovalProcessesForApprovalSchemasRequest {
  schemaIds?: [ string ](name='SchemaIds', description='This parameter is required.'),
}

model ListApprovalProcessesForApprovalSchemasResponseBody = {
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
  schemas?: [ 
    {
      processes?: [ 
        {
          createTime?: string(name='CreateTime', example='2022-10-25 10:44:09'),
          description?: string(name='Description'),
          processId?: string(name='ProcessId', example='approval-process-dc61e92ba5c5****'),
          processName?: string(name='ProcessName'),
        }
      ](name='Processes'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }
  ](name='Schemas'),
}

model ListApprovalProcessesForApprovalSchemasResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApprovalProcessesForApprovalSchemasResponseBody(name='body'),
}

/**
 * @summary 查询审批渲染模板关联的流程
 *
 * @param request ListApprovalProcessesForApprovalSchemasRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApprovalProcessesForApprovalSchemasResponse
 */
async function listApprovalProcessesForApprovalSchemasWithOptions(request: ListApprovalProcessesForApprovalSchemasRequest, runtime: $RuntimeOptions): ListApprovalProcessesForApprovalSchemasResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApprovalProcessesForApprovalSchemas',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询审批渲染模板关联的流程
 *
 * @param request ListApprovalProcessesForApprovalSchemasRequest
 * @return ListApprovalProcessesForApprovalSchemasResponse
 */
async function listApprovalProcessesForApprovalSchemas(request: ListApprovalProcessesForApprovalSchemasRequest): ListApprovalProcessesForApprovalSchemasResponse {
  var runtime = new $RuntimeOptions{};
  return listApprovalProcessesForApprovalSchemasWithOptions(request, runtime);
}

model ListApprovalSchemasRequest {
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  policyType?: string(name='PolicyType', example='DlpSend'),
  schemaIds?: [ string ](name='SchemaIds'),
  schemaName?: string(name='SchemaName', example='test'),
}

model ListApprovalSchemasResponseBody = {
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
  schemas?: [ 
    {
      createTime?: string(name='CreateTime', example='2024-03-15 14:44:07'),
      description?: string(name='Description'),
      isDefault?: boolean(name='IsDefault', example='true'),
      policyType?: string(name='PolicyType', example='DlpSend'),
      schemaContent?: string(name='SchemaContent', example='{"form": {"labelCol": 6,"wrapperCol": 12}}'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      schemaName?: string(name='SchemaName'),
      schemaVersion?: long(name='SchemaVersion', example='1715680940'),
    }
  ](name='Schemas'),
  totalNum?: string(name='TotalNum', example='1'),
}

model ListApprovalSchemasResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApprovalSchemasResponseBody(name='body'),
}

/**
 * @summary 列表查询审批动态模板
 *
 * @param request ListApprovalSchemasRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApprovalSchemasResponse
 */
async function listApprovalSchemasWithOptions(request: ListApprovalSchemasRequest, runtime: $RuntimeOptions): ListApprovalSchemasResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApprovalSchemas',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列表查询审批动态模板
 *
 * @param request ListApprovalSchemasRequest
 * @return ListApprovalSchemasResponse
 */
async function listApprovalSchemas(request: ListApprovalSchemasRequest): ListApprovalSchemasResponse {
  var runtime = new $RuntimeOptions{};
  return listApprovalSchemasWithOptions(request, runtime);
}

model ListApprovalSchemasForApprovalProcessesRequest {
  processIds?: [ string ](name='ProcessIds', description='This parameter is required.'),
}

model ListApprovalSchemasForApprovalProcessesResponseBody = {
  processes?: [ 
    {
      processId?: string(name='ProcessId', example='approval-process-35ee09077ee9****'),
      schemas?: [ 
        {
          createTime?: string(name='CreateTime', example='2024-03-15 14:44:07'),
          description?: string(name='Description'),
          isDefault?: boolean(name='IsDefault', example='true'),
          policyType?: string(name='PolicyType', example='DlpSend'),
          schemaContent?: string(name='SchemaContent', example='{"form": {"labelCol": 6,"wrapperCol": 12}}'),
          schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
          schemaName?: string(name='SchemaName'),
          schemaVersion?: long(name='SchemaVersion', example='1715680940'),
        }
      ](name='Schemas'),
    }
  ](name='Processes'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model ListApprovalSchemasForApprovalProcessesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApprovalSchemasForApprovalProcessesResponseBody(name='body'),
}

/**
 * @summary 查询审批流程关联的渲染模板
 *
 * @param request ListApprovalSchemasForApprovalProcessesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApprovalSchemasForApprovalProcessesResponse
 */
async function listApprovalSchemasForApprovalProcessesWithOptions(request: ListApprovalSchemasForApprovalProcessesRequest, runtime: $RuntimeOptions): ListApprovalSchemasForApprovalProcessesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApprovalSchemasForApprovalProcesses',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询审批流程关联的渲染模板
 *
 * @param request ListApprovalSchemasForApprovalProcessesRequest
 * @return ListApprovalSchemasForApprovalProcessesResponse
 */
async function listApprovalSchemasForApprovalProcesses(request: ListApprovalSchemasForApprovalProcessesRequest): ListApprovalSchemasForApprovalProcessesResponse {
  var runtime = new $RuntimeOptions{};
  return listApprovalSchemasForApprovalProcessesWithOptions(request, runtime);
}

model ListApprovalsRequest {
  approvalIds?: [ string ](name='ApprovalIds'),
  createEndTime?: long(name='CreateEndTime', example='1736750500'),
  createStartTime?: long(name='CreateStartTime', example='1730000000'),
  creatorDepartment?: string(name='CreatorDepartment'),
  creatorDevTag?: string(name='CreatorDevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
  creatorUserId?: string(name='CreatorUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
  creatorUsername?: string(name='CreatorUsername'),
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  operatorUserId?: string(name='OperatorUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
  operatorUsername?: string(name='OperatorUsername'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  policyType?: string(name='PolicyType', example='DlpSend'),
  processId?: string(name='ProcessId', example='approval-process-fcc351b8a95b****'),
  processName?: string(name='ProcessName'),
  schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
  schemaName?: string(name='SchemaName', example='test'),
  statuses?: [ string ](name='Statuses'),
}

model ListApprovalsResponseBody = {
  approvals?: [ 
    {
      approvalDetail?: string(name='ApprovalDetail'),
      approvalId?: string(name='ApprovalId', example='approval-872b5e911b35****'),
      approvalProgresses?: [ 
        {
          action?: string(name='Action', example='Approve'),
          comment?: string(name='Comment'),
          executor?: string(name='Executor', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
          operators?: [ 
            {
              saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
              username?: string(name='Username'),
            }
          ](name='Operators'),
          status?: string(name='Status', example='Approved'),
          timestamp?: long(name='Timestamp', example='1736752000'),
        }
      ](name='ApprovalProgresses'),
      createTime?: string(name='CreateTime', example='2022-11-15 22:11:55'),
      creatorDepartment?: string(name='CreatorDepartment'),
      creatorDevTag?: string(name='CreatorDevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      creatorUserId?: string(name='CreatorUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      creatorUsername?: string(name='CreatorUsername'),
      endTimestamp?: long(name='EndTimestamp', example='1757952000'),
      policyType?: string(name='PolicyType', example='DlpSend'),
      processId?: string(name='ProcessId', example='approval-process-fcc351b8a95b****'),
      processName?: string(name='ProcessName'),
      reason?: string(name='Reason'),
      schemaContent?: string(name='SchemaContent', example='{"form": {"labelCol": 6,"wrapperCol": 12}}'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      schemaName?: string(name='SchemaName'),
      status?: string(name='Status', example='Pending'),
    }
  ](name='Approvals'),
  requestId?: string(name='RequestId', example='6965F5BA-53B6-5650-A708-51F090F843BB'),
  totalNum?: string(name='TotalNum', example='1'),
}

model ListApprovalsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApprovalsResponseBody(name='body'),
}

/**
 * @summary 批量查询审批
 *
 * @param request ListApprovalsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApprovalsResponse
 */
async function listApprovalsWithOptions(request: ListApprovalsRequest, runtime: $RuntimeOptions): ListApprovalsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListApprovals',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询审批
 *
 * @param request ListApprovalsRequest
 * @return ListApprovalsResponse
 */
async function listApprovals(request: ListApprovalsRequest): ListApprovalsResponse {
  var runtime = new $RuntimeOptions{};
  return listApprovalsWithOptions(request, runtime);
}

model ListClientUsersRequest {
  currentPage?: long(name='CurrentPage', example='1'),
  departmentId?: string(name='DepartmentId', example='10785'),
  email?: string(name='Email', example='johndoe@example.com'),
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='1071'),
  mobileNumber?: string(name='MobileNumber', example='18980976559'),
  pageSize?: long(name='PageSize', example='10'),
  status?: string(name='Status', example='Enabled'),
  username?: string(name='Username'),
}

model ListClientUsersResponseBody = {
  data?: {
    dataList?: [ 
      {
        department?: {
          id?: string(name='Id', example='105'),
          name?: string(name='Name'),
        }(name='Department'),
        departmentId?: string(name='DepartmentId', example='10800'),
        description?: string(name='Description'),
        email?: string(name='Email', example='johndoe@example.com'),
        id?: string(name='Id', example='1970'),
        idpConfigId?: string(name='IdpConfigId', example='1026'),
        mobileNumber?: string(name='MobileNumber', example='15800820468'),
        status?: string(name='Status', example='Disabled'),
        userId?: string(name='UserId', example='su_dead7216****'),
        username?: string(name='Username'),
      }
    ](name='DataList'),
    totalNum?: long(name='TotalNum', example='2'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='FEF1144C-95D1-5F7C-81EF-9DB70EA49FCE'),
}

model ListClientUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClientUsersResponseBody(name='body'),
}

/**
 * @summary 查询自定义身份源用户
 *
 * @param request ListClientUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClientUsersResponse
 */
async function listClientUsersWithOptions(request: ListClientUsersRequest, runtime: $RuntimeOptions): ListClientUsersResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListClientUsers',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自定义身份源用户
 *
 * @param request ListClientUsersRequest
 * @return ListClientUsersResponse
 */
async function listClientUsers(request: ListClientUsersRequest): ListClientUsersResponse {
  var runtime = new $RuntimeOptions{};
  return listClientUsersWithOptions(request, runtime);
}

model ListConnectorsRequest {
  connectorIds?: [ string ](name='ConnectorIds'),
  currentPage?: int32(name='CurrentPage', description='This parameter is required.', example='1'),
  name?: string(name='Name', example='connector_name'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  status?: string(name='Status'),
  switchStatus?: string(name='SwitchStatus'),
}

model ListConnectorsResponseBody = {
  connectors?: [ 
    {
      applications?: [ 
        {
          applicationId?: string(name='ApplicationId', example='pa-application-e12860ef6c48****'),
          applicationName?: string(name='ApplicationName', example='application_name'),
        }
      ](name='Applications'),
      connectorClients?: [ 
        {
          connectionStatus?: string(name='ConnectionStatus'),
          devTag?: string(name='DevTag'),
          hostname?: string(name='Hostname'),
          publicIp?: string(name='PublicIp'),
        }
      ](name='ConnectorClients'),
      connectorId?: string(name='ConnectorId', description='ConnectorID。', example='connector-94db94e06b98****'),
      createTime?: string(name='CreateTime', example='2022-09-27 18:10:25'),
      name?: string(name='Name', example='connector_name'),
      regionId?: string(name='RegionId', example='cn-hangzhou'),
      status?: string(name='Status', example='Online'),
      switchStatus?: string(name='SwitchStatus', example='Enabled'),
      upgradeTime?: {
        end?: string(name='End', example='23:00'),
        start?: string(name='Start', example='20:00'),
      }(name='UpgradeTime'),
    }
  ](name='Connectors'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: int32(name='TotalNum', example='1'),
}

model ListConnectorsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListConnectorsResponseBody(name='body'),
}

/**
 * @summary 批量查询connector
 *
 * @param request ListConnectorsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListConnectorsResponse
 */
async function listConnectorsWithOptions(request: ListConnectorsRequest, runtime: $RuntimeOptions): ListConnectorsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListConnectors',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询connector
 *
 * @param request ListConnectorsRequest
 * @return ListConnectorsResponse
 */
async function listConnectors(request: ListConnectorsRequest): ListConnectorsResponse {
  var runtime = new $RuntimeOptions{};
  return listConnectorsWithOptions(request, runtime);
}

model ListDynamicDisposalProcessesRequest {
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  devTag?: string(name='DevTag'),
  disposalAction?: string(name='DisposalAction', example='none'),
  disposalProcessId?: string(name='DisposalProcessId', example='dp-xxxxxxxx'),
  endTime?: long(name='EndTime', example='1743143296'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  recoveryType?: string(name='RecoveryType', example='auto'),
  startTime?: long(name='StartTime', example='1743143296'),
  status?: string(name='Status', example='disposal'),
  userName?: string(name='UserName', example='xiaoming'),
}

model ListDynamicDisposalProcessesResponseBody = {
  disposalProcesses?: [ 
    {
      department?: string(name='Department'),
      devTag?: string(name='DevTag', example='FD7554AD-4CDE-6359-6B49-4FE950606C2C'),
      deviceBasicInfo?: {
        cpu?: string(name='Cpu'),
        devTag?: string(name='DevTag'),
        devType?: string(name='DevType'),
        disk?: string(name='Disk'),
        hostname?: string(name='Hostname'),
        mac?: string(name='Mac'),
        memory?: string(name='Memory'),
        osVersion?: string(name='OsVersion'),
      }(name='DeviceBasicInfo'),
      deviceStatusInfo?: {
        appVersion?: string(name='AppVersion'),
        department?: string(name='Department'),
        dlpStatus?: string(name='DlpStatus'),
        internetIp?: string(name='InternetIp'),
        laStatus?: string(name='LaStatus'),
        loginStatus?: string(name='LoginStatus'),
        nacStatus?: string(name='NacStatus'),
        privateIp?: string(name='PrivateIp'),
        saseUserId?: string(name='SaseUserId'),
        username?: string(name='Username'),
        workshop?: string(name='Workshop'),
        ztnaStatus?: string(name='ZtnaStatus'),
      }(name='DeviceStatusInfo'),
      disposalActions?: [ string ](name='DisposalActions'),
      disposalProcessId?: string(name='DisposalProcessId', example='dp-xxxxxxxx'),
      disposalTime?: string(name='DisposalTime', example='1743059249'),
      dynamicPolicyId?: string(name='DynamicPolicyId', example='dynamic-policy-xxxxxxxx'),
      dynamicPolicyName?: string(name='DynamicPolicyName'),
      hostname?: string(name='Hostname', example='WANGCHENCHENNBB'),
      recoveryType?: string(name='RecoveryType', example='auto'),
      ruleContent?: any(name='RuleContent', example='{
  "Combinator": "OR",
  "Rules": [
    {
      "Operator": "version_gt",
      "Values": [
        "1"
      ],
      "RuleType": "device_info",
      "Id": "1",
      "RuleSubType": "basic_info",
      "Name": "app_version"
    }
  ]
}'),
      saseUserId?: string(name='SaseUserId', example='asdqwedg-xzczvzdaf-asfafs'),
      status?: string(name='Status', example='disposal'),
      userName?: string(name='UserName', example='xiaoming'),
    }
  ](name='DisposalProcesses'),
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
  totalNum?: int32(name='TotalNum', example='1'),
}

model ListDynamicDisposalProcessesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDynamicDisposalProcessesResponseBody(name='body'),
}

/**
 * @summary 批量查询动态策略处置流程
 *
 * @param request ListDynamicDisposalProcessesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDynamicDisposalProcessesResponse
 */
async function listDynamicDisposalProcessesWithOptions(request: ListDynamicDisposalProcessesRequest, runtime: $RuntimeOptions): ListDynamicDisposalProcessesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListDynamicDisposalProcesses',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询动态策略处置流程
 *
 * @param request ListDynamicDisposalProcessesRequest
 * @return ListDynamicDisposalProcessesResponse
 */
async function listDynamicDisposalProcesses(request: ListDynamicDisposalProcessesRequest): ListDynamicDisposalProcessesResponse {
  var runtime = new $RuntimeOptions{};
  return listDynamicDisposalProcessesWithOptions(request, runtime);
}

model ListDynamicRouteRegionsResponseBody = {
  regions?: [ string ](name='Regions'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: int32(name='TotalNum', example='1'),
}

model ListDynamicRouteRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDynamicRouteRegionsResponseBody(name='body'),
}

/**
 * @summary 批量查询动态路由的地域
 *
 * @param request ListDynamicRouteRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDynamicRouteRegionsResponse
 */
async function listDynamicRouteRegionsWithOptions(runtime: $RuntimeOptions): ListDynamicRouteRegionsResponse {
  var req = new OpenApiUtil.OpenApiRequest{};
  var params = new OpenApiUtil.Params{
    action = 'ListDynamicRouteRegions',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询动态路由的地域
 *
 * @return ListDynamicRouteRegionsResponse
 */
async function listDynamicRouteRegions(): ListDynamicRouteRegionsResponse {
  var runtime = new $RuntimeOptions{};
  return listDynamicRouteRegionsWithOptions(runtime);
}

model ListDynamicRoutesRequest {
  applicationId?: string(name='ApplicationId', example='pa-application-e12860ef6c48****'),
  currentPage?: int32(name='CurrentPage', description='This parameter is required.', example='1'),
  dynamicRouteIds?: [ string ](name='DynamicRouteIds'),
  name?: string(name='Name', example='dynamic_route_name'),
  nextHop?: string(name='NextHop', example='connector-8ccb13b6f52c****'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  regionIds?: [ string ](name='RegionIds'),
  status?: string(name='Status', example='Enabled'),
  tagId?: string(name='TagId', example='tag-d3f64e8bdd4a****'),
}

model ListDynamicRoutesResponseBody = {
  dynamicRoutes?: [ 
    {
      applicationIds?: [ string ](name='ApplicationIds'),
      applicationType?: string(name='ApplicationType', example='Application'),
      createTime?: string(name='CreateTime', example='2023-03-21 11:50:03'),
      description?: string(name='Description'),
      dynamicRouteId?: string(name='DynamicRouteId', example='dr-a0ca843f53cf****'),
      dynamicRouteType?: string(name='DynamicRouteType', example='connector'),
      name?: string(name='Name', example='dynamic_route_name'),
      nextHop?: string(name='NextHop', example='connector-8ccb13b6f52c****'),
      priority?: int32(name='Priority', example='1'),
      regionIds?: [ string ](name='RegionIds'),
      status?: string(name='Status', example='Enabled'),
      tagIds?: [ string ](name='TagIds'),
    }
  ](name='DynamicRoutes'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: int32(name='TotalNum', example='1'),
}

model ListDynamicRoutesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDynamicRoutesResponseBody(name='body'),
}

/**
 * @summary 批量查询动态路由
 *
 * @param request ListDynamicRoutesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDynamicRoutesResponse
 */
async function listDynamicRoutesWithOptions(request: ListDynamicRoutesRequest, runtime: $RuntimeOptions): ListDynamicRoutesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListDynamicRoutes',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询动态路由
 *
 * @param request ListDynamicRoutesRequest
 * @return ListDynamicRoutesResponse
 */
async function listDynamicRoutes(request: ListDynamicRoutesRequest): ListDynamicRoutesResponse {
  var runtime = new $RuntimeOptions{};
  return listDynamicRoutesWithOptions(request, runtime);
}

model ListExcessiveDeviceRegistrationApplicationsRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  department?: string(name='Department'),
  deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
  hostname?: string(name='Hostname', example='win10-64bit'),
  mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
  statuses?: [ string ](name='Statuses'),
  username?: string(name='Username'),
}

model ListExcessiveDeviceRegistrationApplicationsResponseBody = {
  applications?: [ 
    {
      applicationId?: string(name='ApplicationId', example='reg-application-0f4a127b7e78****'),
      createTime?: string(name='CreateTime', example='2023-07-17 18:46:55'),
      department?: string(name='Department'),
      description?: string(name='Description'),
      deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      deviceType?: string(name='DeviceType', example='Windows'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      isUsed?: boolean(name='IsUsed', example='false'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      status?: string(name='Status', example='Approved'),
      username?: string(name='Username'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: long(name='TotalNum', example='1'),
}

model ListExcessiveDeviceRegistrationApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListExcessiveDeviceRegistrationApplicationsResponseBody(name='body'),
}

/**
 * @summary 批量查询超额注册申请列表
 *
 * @param request ListExcessiveDeviceRegistrationApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListExcessiveDeviceRegistrationApplicationsResponse
 */
async function listExcessiveDeviceRegistrationApplicationsWithOptions(request: ListExcessiveDeviceRegistrationApplicationsRequest, runtime: $RuntimeOptions): ListExcessiveDeviceRegistrationApplicationsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListExcessiveDeviceRegistrationApplications',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询超额注册申请列表
 *
 * @param request ListExcessiveDeviceRegistrationApplicationsRequest
 * @return ListExcessiveDeviceRegistrationApplicationsResponse
 */
async function listExcessiveDeviceRegistrationApplications(request: ListExcessiveDeviceRegistrationApplicationsRequest): ListExcessiveDeviceRegistrationApplicationsResponse {
  var runtime = new $RuntimeOptions{};
  return listExcessiveDeviceRegistrationApplicationsWithOptions(request, runtime);
}

model ListIdpConfigsRequest {
  currentPage?: long(name='CurrentPage', example='1'),
  include?: string(name='Include', example='CSAS,DingTalk,LDAP'),
  pageSize?: long(name='PageSize', example='10'),
}

model ListIdpConfigsResponseBody = {
  data?: {
    dataList?: [ 
      {
        description?: string(name='Description'),
        id?: string(name='Id', example='277'),
        mfa?: string(name='Mfa', example='totp'),
        mobileLoginType?: string(name='MobileLoginType', example='password'),
        mobileMfaConfigType?: string(name='MobileMfaConfigType', example='password'),
        multiIdpInfo?: string(name='MultiIdpInfo', example='1482,1355'),
        name?: string(name='Name'),
        pcLoginType?: string(name='PcLoginType', example='password'),
        status?: string(name='Status', example='Disabled'),
        type?: string(name='Type', example='DingTalk'),
        updateTime?: string(name='UpdateTime', example='2023-05-09T02:22:41.430Z'),
      }
    ](name='DataList'),
    totalNum?: long(name='TotalNum', example='1'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='FD724DBC-CD76-5235-BF76-59C51B73296D'),
}

model ListIdpConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListIdpConfigsResponseBody(name='body'),
}

/**
 * @summary 查询IDP配置
 *
 * @param request ListIdpConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListIdpConfigsResponse
 */
async function listIdpConfigsWithOptions(request: ListIdpConfigsRequest, runtime: $RuntimeOptions): ListIdpConfigsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListIdpConfigs',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询IDP配置
 *
 * @param request ListIdpConfigsRequest
 * @return ListIdpConfigsResponse
 */
async function listIdpConfigs(request: ListIdpConfigsRequest): ListIdpConfigsResponse {
  var runtime = new $RuntimeOptions{};
  return listIdpConfigsWithOptions(request, runtime);
}

model ListIdpDepartmentsRequest {
  currentPage?: long(name='CurrentPage', example='1'),
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='1440'),
  pageSize?: long(name='PageSize', example='10'),
}

model ListIdpDepartmentsResponseBody = {
  data?: {
    dataList?: [ 
      {
        id?: string(name='Id', example='30520'),
        idpConfigId?: string(name='IdpConfigId', example='1440'),
        name?: string(name='Name'),
      }
    ](name='DataList'),
    totalNum?: long(name='TotalNum', example='2'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
}

model ListIdpDepartmentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListIdpDepartmentsResponseBody(name='body'),
}

/**
 * @summary 查询自定义身份源部门
 *
 * @param request ListIdpDepartmentsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListIdpDepartmentsResponse
 */
async function listIdpDepartmentsWithOptions(request: ListIdpDepartmentsRequest, runtime: $RuntimeOptions): ListIdpDepartmentsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListIdpDepartments',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自定义身份源部门
 *
 * @param request ListIdpDepartmentsRequest
 * @return ListIdpDepartmentsResponse
 */
async function listIdpDepartments(request: ListIdpDepartmentsRequest): ListIdpDepartmentsResponse {
  var runtime = new $RuntimeOptions{};
  return listIdpDepartmentsWithOptions(request, runtime);
}

model ListNacUserCertRequest {
  currentPage?: string(name='CurrentPage', example='1'),
  department?: string(name='Department'),
  deviceType?: string(name='DeviceType', example='windows'),
  endTime?: long(name='EndTime', example='1702770400'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: long(name='StartTime', example='1702260834'),
  status?: string(name='Status', example='Enabled'),
  username?: string(name='Username', example='zhang**'),
}

model ListNacUserCertResponseBody = {
  code?: long(name='Code', example='200'),
  dataList?: [ 
    {
      aliuid?: string(name='Aliuid', example='1'),
      department?: string(name='Department'),
      devTag?: string(name='DevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      deviceType?: string(name='DeviceType', example='windows'),
      expiredTime?: string(name='ExpiredTime', example='2029-06-30 09:31:54'),
      hostname?: string(name='Hostname', example='MS-XU****'),
      mac?: string(name='Mac', example='08:f8:**:**:**:5e'),
      status?: string(name='Status', example='Disabled'),
      userId?: string(name='UserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      username?: string(name='Username', example='zhang**'),
    }
  ](name='DataList'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: long(name='TotalNum', example='1'),
}

model ListNacUserCertResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListNacUserCertResponseBody(name='body'),
}

/**
 * @summary 入网用户列表
 *
 * @param request ListNacUserCertRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListNacUserCertResponse
 */
async function listNacUserCertWithOptions(request: ListNacUserCertRequest, runtime: $RuntimeOptions): ListNacUserCertResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!$isNull(request.department)) {
    query['Department'] = request.department;
  }
  if (!$isNull(request.deviceType)) {
    query['DeviceType'] = request.deviceType;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  if (!$isNull(request.username)) {
    query['Username'] = request.username;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListNacUserCert',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 入网用户列表
 *
 * @param request ListNacUserCertRequest
 * @return ListNacUserCertResponse
 */
async function listNacUserCert(request: ListNacUserCertRequest): ListNacUserCertResponse {
  var runtime = new $RuntimeOptions{};
  return listNacUserCertWithOptions(request, runtime);
}

model ListPolicesForPrivateAccessApplicationRequest {
  applicationIds?: [ string ](name='ApplicationIds', description='This parameter is required.'),
}

model ListPolicesForPrivateAccessApplicationResponseBody = {
  applications?: [ 
    {
      applicationId?: string(name='ApplicationId', example='pa-application-b927baf3e592****'),
      policies?: [ 
        {
          applicationType?: string(name='ApplicationType', example='Application'),
          createTime?: string(name='CreateTime', example='2022-09-27 18:10:25'),
          customUserAttributes?: [ 
            {
              idpId?: int32(name='IdpId', example='12'),
              relation?: string(name='Relation', example='Equal'),
              userGroupType?: string(name='UserGroupType', example='department'),
              value?: string(name='Value'),
            }
          ](name='CustomUserAttributes'),
          description?: string(name='Description'),
          name?: string(name='Name', example='private_access_policy_name'),
          policyAction?: string(name='PolicyAction', example='Allow'),
          policyId?: string(name='PolicyId', example='pa-policy-867ef4007c8a****'),
          priority?: int32(name='Priority', example='1'),
          status?: string(name='Status', example='Enabled'),
          userGroupType?: string(name='UserGroupType', example='Normal'),
        }
      ](name='Policies'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='4AB972E2-D702-5464-B132-B1911498B8BF'),
}

model ListPolicesForPrivateAccessApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPolicesForPrivateAccessApplicationResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问应用的策略
 *
 * @param request ListPolicesForPrivateAccessApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPolicesForPrivateAccessApplicationResponse
 */
async function listPolicesForPrivateAccessApplicationWithOptions(request: ListPolicesForPrivateAccessApplicationRequest, runtime: $RuntimeOptions): ListPolicesForPrivateAccessApplicationResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPolicesForPrivateAccessApplication',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问应用的策略
 *
 * @param request ListPolicesForPrivateAccessApplicationRequest
 * @return ListPolicesForPrivateAccessApplicationResponse
 */
async function listPolicesForPrivateAccessApplication(request: ListPolicesForPrivateAccessApplicationRequest): ListPolicesForPrivateAccessApplicationResponse {
  var runtime = new $RuntimeOptions{};
  return listPolicesForPrivateAccessApplicationWithOptions(request, runtime);
}

model ListPolicesForPrivateAccessTagRequest {
  tagIds?: [ string ](name='TagIds', description='This parameter is required.'),
}

model ListPolicesForPrivateAccessTagResponseBody = {
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
  tags?: [ 
    {
      polices?: [ 
        {
          applicationType?: string(name='ApplicationType', example='Application'),
          createTime?: string(name='CreateTime', description='内网访问策略创建时间。', example='2023-02-21 14:10:16'),
          customUserAttributes?: [ 
            {
              idpId?: int32(name='IdpId', description='用户组的身份源ID。当自定义用户组类型为**department**时，存在该值。', example='12'),
              relation?: string(name='Relation', description='用户组的关系。取值：
- **Equal**：等于。
- **Unequal**：不等于。', example='Equal'),
              userGroupType?: string(name='UserGroupType', description='用户组的类型。取值：
- **username**：用户名。
- **department**：部门。
- **email**：邮箱。
- **telephone**：手机。', example='department'),
              value?: string(name='Value', description='用户组属性的值。
- 当用户组类型为**username**时，表示用户名的值。长度为1~128个字符，支持中文和大小写英文字母，可包含数字、半角句号（.）、下划线（_）和短划线（-）。
- 当用户组类型为**department**时，表示部门的值。如：OU=部门1,OU=SASE钉钉。
- 当用户组类型为**email**时，表示邮箱的值。如：username@example.com。
- 当用户组类型为**telephone**时，表示手机的值。如：13900001234。', example='OU=部门1,OU=SASE钉钉'),
            }
          ](name='CustomUserAttributes', description='自定义用户组属性集合。多个自定义用户组属性之间是或的关系，按照合集生效。'),
          description?: string(name='Description'),
          name?: string(name='Name', example='private_access_policy_name'),
          policyAction?: string(name='PolicyAction', example='Allow'),
          policyId?: string(name='PolicyId', example='pa-policy-867ef4007c8a****'),
          priority?: int32(name='Priority', example='1'),
          status?: string(name='Status', example='Enabled'),
          userGroupType?: string(name='UserGroupType', example='Normal'),
        }
      ](name='Polices'),
      tagId?: string(name='TagId', example='tag-b927baf3e592****'),
    }
  ](name='Tags'),
}

model ListPolicesForPrivateAccessTagResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPolicesForPrivateAccessTagResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问标签的策略
 *
 * @param request ListPolicesForPrivateAccessTagRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPolicesForPrivateAccessTagResponse
 */
async function listPolicesForPrivateAccessTagWithOptions(request: ListPolicesForPrivateAccessTagRequest, runtime: $RuntimeOptions): ListPolicesForPrivateAccessTagResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPolicesForPrivateAccessTag',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问标签的策略
 *
 * @param request ListPolicesForPrivateAccessTagRequest
 * @return ListPolicesForPrivateAccessTagResponse
 */
async function listPolicesForPrivateAccessTag(request: ListPolicesForPrivateAccessTagRequest): ListPolicesForPrivateAccessTagResponse {
  var runtime = new $RuntimeOptions{};
  return listPolicesForPrivateAccessTagWithOptions(request, runtime);
}

model ListPolicesForUserGroupRequest {
  userGroupIds?: [ string ](name='UserGroupIds', description='This parameter is required.'),
}

model ListPolicesForUserGroupResponseBody = {
  requestId?: string(name='RequestId', example='5F04DFBD-3F48-5F70-AE72-474026670128'),
  userGroups?: [ 
    {
      polices?: [ 
        {
          name?: string(name='Name', example='private_access_policy_name'),
          policyId?: string(name='PolicyId', example='pa-policy-ce2bf7236fab****'),
          policyType?: string(name='PolicyType', example='PrivateAccess'),
        }
      ](name='Polices'),
      userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
    }
  ](name='UserGroups'),
}

model ListPolicesForUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPolicesForUserGroupResponseBody(name='body'),
}

/**
 * @summary 批量查询用户组的策略
 *
 * @param request ListPolicesForUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPolicesForUserGroupResponse
 */
async function listPolicesForUserGroupWithOptions(request: ListPolicesForUserGroupRequest, runtime: $RuntimeOptions): ListPolicesForUserGroupResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPolicesForUserGroup',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询用户组的策略
 *
 * @param request ListPolicesForUserGroupRequest
 * @return ListPolicesForUserGroupResponse
 */
async function listPolicesForUserGroup(request: ListPolicesForUserGroupRequest): ListPolicesForUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return listPolicesForUserGroupWithOptions(request, runtime);
}

model ListPopTrafficStatisticsRequest {
  endTime?: string(name='EndTime', example='1681293719'),
  region?: string(name='Region', example='cn-hangzhou'),
  startTime?: string(name='StartTime', example='1681035708'),
}

model ListPopTrafficStatisticsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='EFE7EBB2-449D-5BBB-B381-CA7839BC1649'),
  trafficData?: [ 
    {
      datapoints?: [ 
        {
          average?: double(name='Average', example='15325'),
          dateTime?: string(name='DateTime', example='2023-12-06 15:29:00'),
        }
      ](name='Datapoints'),
      metricName?: string(name='MetricName', example='InternetTx'),
    }
  ](name='TrafficData'),
}

model ListPopTrafficStatisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPopTrafficStatisticsResponseBody(name='body'),
}

/**
 * @summary pop节点流量统计
 *
 * @param request ListPopTrafficStatisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPopTrafficStatisticsResponse
 */
async function listPopTrafficStatisticsWithOptions(request: ListPopTrafficStatisticsRequest, runtime: $RuntimeOptions): ListPopTrafficStatisticsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPopTrafficStatistics',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary pop节点流量统计
 *
 * @param request ListPopTrafficStatisticsRequest
 * @return ListPopTrafficStatisticsResponse
 */
async function listPopTrafficStatistics(request: ListPopTrafficStatisticsRequest): ListPopTrafficStatisticsResponse {
  var runtime = new $RuntimeOptions{};
  return listPopTrafficStatisticsWithOptions(request, runtime);
}

model ListPrivateAccessApplicationsRequest {
  accessModes?: string(name='AccessModes'),
  address?: string(name='Address', example='192.168.0.0/16'),
  applicationIds?: [ string ](name='ApplicationIds'),
  connectorId?: string(name='ConnectorId'),
  currentPage?: int32(name='CurrentPage', description='This parameter is required.', example='1'),
  name?: string(name='Name', example='private_access_application_name'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  policyId?: string(name='PolicyId', example='pa-policy-54a7838a48bf****'),
  status?: string(name='Status', example='Enabled'),
  tagId?: string(name='TagId', example='tag-d3f64e8bdd4a****'),
}

model ListPrivateAccessApplicationsResponseBody = {
  applications?: [ 
    {
      addresses?: [ string ](name='Addresses'),
      applicationId?: string(name='ApplicationId', example='pa-application-e12860ef6c48****'),
      browserAccessStatus?: string(name='BrowserAccessStatus'),
      connectorIds?: [ string ](name='ConnectorIds'),
      createTime?: string(name='CreateTime', example='2022-12-16 15:03:42'),
      description?: string(name='Description'),
      l7ProxyDomainAutomatic?: string(name='L7ProxyDomainAutomatic'),
      l7ProxyDomainCustom?: string(name='L7ProxyDomainCustom'),
      name?: string(name='Name', example='private_access_application_name'),
      policyIds?: [ string ](name='PolicyIds'),
      portRanges?: [ 
        {
          begin?: int32(name='Begin', example='80'),
          end?: int32(name='End', example='81'),
        }
      ](name='PortRanges'),
      protocol?: string(name='Protocol', example='All'),
      status?: string(name='Status', example='Enabled'),
      tagIds?: [ string ](name='TagIds'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='748CFDC7-1EB6-5B8B-9405-DA76ED5BB60D'),
  totalNum?: int32(name='TotalNum', example='1'),
}

model ListPrivateAccessApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPrivateAccessApplicationsResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问应用
 *
 * @param request ListPrivateAccessApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPrivateAccessApplicationsResponse
 */
async function listPrivateAccessApplicationsWithOptions(request: ListPrivateAccessApplicationsRequest, runtime: $RuntimeOptions): ListPrivateAccessApplicationsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPrivateAccessApplications',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问应用
 *
 * @param request ListPrivateAccessApplicationsRequest
 * @return ListPrivateAccessApplicationsResponse
 */
async function listPrivateAccessApplications(request: ListPrivateAccessApplicationsRequest): ListPrivateAccessApplicationsResponse {
  var runtime = new $RuntimeOptions{};
  return listPrivateAccessApplicationsWithOptions(request, runtime);
}

model ListPrivateAccessApplicationsForDynamicRouteRequest {
  dynamicRouteIds?: [ string ](name='DynamicRouteIds', description='This parameter is required.'),
}

model ListPrivateAccessApplicationsForDynamicRouteResponseBody = {
  dynamicRoutes?: [ 
    {
      applications?: [ 
        {
          addresses?: [ string ](name='Addresses'),
          applicationId?: string(name='ApplicationId', example='pa-application-7a9243dd02f4****'),
          createTime?: string(name='CreateTime', example='2022-04-13 13:33:24'),
          description?: string(name='Description'),
          name?: string(name='Name', example='application_name'),
          portRanges?: [ 
            {
              begin?: int32(name='Begin', example='80'),
              end?: int32(name='End', example='81'),
            }
          ](name='PortRanges'),
          protocol?: string(name='Protocol', example='All'),
          status?: string(name='Status', example='Enabled'),
        }
      ](name='Applications'),
      dynamicRouteId?: string(name='DynamicRouteId', example='dr-ca9fddfac7c6****'),
    }
  ](name='DynamicRoutes'),
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model ListPrivateAccessApplicationsForDynamicRouteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPrivateAccessApplicationsForDynamicRouteResponseBody(name='body'),
}

/**
 * @summary 批量查询动态路由的内网访问应用
 *
 * @param request ListPrivateAccessApplicationsForDynamicRouteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPrivateAccessApplicationsForDynamicRouteResponse
 */
async function listPrivateAccessApplicationsForDynamicRouteWithOptions(request: ListPrivateAccessApplicationsForDynamicRouteRequest, runtime: $RuntimeOptions): ListPrivateAccessApplicationsForDynamicRouteResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPrivateAccessApplicationsForDynamicRoute',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询动态路由的内网访问应用
 *
 * @param request ListPrivateAccessApplicationsForDynamicRouteRequest
 * @return ListPrivateAccessApplicationsForDynamicRouteResponse
 */
async function listPrivateAccessApplicationsForDynamicRoute(request: ListPrivateAccessApplicationsForDynamicRouteRequest): ListPrivateAccessApplicationsForDynamicRouteResponse {
  var runtime = new $RuntimeOptions{};
  return listPrivateAccessApplicationsForDynamicRouteWithOptions(request, runtime);
}

model ListPrivateAccessPolicesRequest {
  applicationId?: string(name='ApplicationId', description='The ID of the office application. Either the ID or tag of the office application is used for queries. You can obtain the value by calling the following operations:

*   [ListPrivateAccessApplications](~~ListPrivateAccessApplications~~): queries office applications.
*   [CreatePrivateAccessApplication](~~CreatePrivateAccessApplication~~): creates an office application.', example='pa-application-e12860ef6c48****'),
  applicationName?: string(name='ApplicationName', description='The name of the office application.', example='Office'),
  currentPage?: int32(name='CurrentPage', description='The page number. Valid values: 1 to 10000.

This parameter is required.', example='1'),
  name?: string(name='Name', description='The name of the private access policy. The value must be 1 to 128 characters in length and can contain letters, digits, hyphens (-), underscores (_), and periods (.).', example='private_access_policy_name'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 1000.

This parameter is required.', example='10'),
  policyAction?: string(name='PolicyAction', description='The action in the private access policy. Valid values:

*   **Block**
*   **Allow**', example='Allow'),
  policyIds?: [ string ](name='PolicyIds', description='The IDs of the private access policies. You can enter up to 100 IDs.'),
  status?: string(name='Status', description='The status of the private access policy. Valid values:

*   **Enabled**
*   **Disabled**', example='Enabled'),
  tagId?: string(name='TagId', description='The ID of the tag for the office application. Either the ID or tag of the office application is used for queries. You can obtain the value by calling the following operations:

*   [ListPrivateAccessTags](~~ListPrivateAccessTags~~): queries tags for office applications.
*   [CreatePrivateAccessTag](~~CreatePrivateAccessTag~~): creates a tag for office applications.', example='tag-c0cb77857a99****'),
  tagName?: string(name='TagName', description='The name of the tag.', example='Cloud service'),
  userGroupId?: string(name='UserGroupId', description='The ID of the user group. You can obtain the value by calling the following operations:

*   [ListUserGroups](~~ListUserGroups~~): queries user groups.
*   [CreateUserGroup](~~CreateUserGroup~~): creates a user group.', example='usergroup-6f1ef2fc56b6****'),
}

model ListPrivateAccessPolicesResponseBody = {
  polices?: [ 
    {
      applicationIds?: [ string ](name='ApplicationIds', description='The IDs of the applications that are specified in the private access policy. If the value of ApplicationType is **Application**, this parameter is returned.'),
      applicationType?: string(name='ApplicationType', description='The application type of the private access policy. Valid values:

*   **Application**
*   **Tag**', example='Application'),
      createTime?: string(name='CreateTime', description='The creation time of the private access policy.', example='2022-07-10 15:50:23'),
      customUserAttributes?: [ 
        {
          idpId?: int32(name='IdpId', description='The ID of the identity provider (IdP) for the user group. If the value of UserGroupType is **department**, this parameter is returned.', example='12'),
          relation?: string(name='Relation', description='The logical operator for the user group. Valid values:

*   **Equal**
*   **Unequal**', example='Equal'),
          userGroupType?: string(name='UserGroupType', description='The type of the user group, which is the key of the attribute. Valid values:

*   **username**
*   **department**
*   **email**
*   **telephone**', example='department'),
          value?: string(name='Value', description='The value of the attribute.

*   If the value of UserGroupType is **username**, the value of this parameter is a username. The value must be 1 to 128 characters in length and can contain letters, digits, hyphens (-), underscores (_), and periods (.).
*   If the value of UserGroupType is **department**, the value of this parameter is a department. Examples: OU=Department 1, OU=SASE DingTalk.
*   If the value of UserGroupType is **email**, the value of this parameter is an email address. Example: username@example.com.
*   If the value of UserGroupType is **telephone**, the value of this parameter is a mobile phone number. Example: 13900001234.', example='OU=Department 1, OU=SASE DingTalk'),
        }
      ](name='CustomUserAttributes', description='The attributes of the custom user group. The attributes of the custom user group are evaluated by using a logical OR. If an attribute is matched, the policy takes effect.'),
      description?: string(name='Description', description='The description of the private access policy.', example='a private access policy'),
      deviceAttributeAction?: string(name='DeviceAttributeAction', description='The action that is performed when the security baseline is not met. Valid values:

*   **Block**
*   **Observe**', example='Block'),
      deviceAttributeId?: string(name='DeviceAttributeId', description='The ID of the security baseline.', example='dag-d3f64e8bdd4a****'),
      name?: string(name='Name', description='The name of the private access policy.', example='private_access_policy_name'),
      policyAction?: string(name='PolicyAction', description='The action in the private access policy. Valid values:

*   **Block**
*   **Allow**', example='Allow'),
      policyId?: string(name='PolicyId', description='The ID of the private access policy.', example='pa-policy-63b2f1844b86****'),
      priority?: int32(name='Priority', description='The priority of the private access policy. The value 1 indicates the highest priority.', example='1'),
      status?: string(name='Status', description='The status of the private access policy. Valid values:

*   **Enabled**
*   **Disabled**', example='Enabled'),
      tagIds?: [ string ](name='TagIds', description='The IDs of the tags that are specified in the private access policy. If the value of ApplicationType is **Tag**, this parameter is returned.'),
      triggerTemplateId?: string(name='TriggerTemplateId', description='The ID of the trigger template.', example='dag-d3f64e8bdd4a****'),
      userGroupIds?: [ string ](name='UserGroupIds', description='The IDs of user groups in the private access policy. If the value of UserGroupMode is **Normal**, this parameter is returned.'),
      userGroupMode?: string(name='UserGroupMode', description='The type of the user group in the private access policy. Valid values:

*   **Normal**: regular user group.
*   **Custom**: custom user group.', example='Normal'),
    }
  ](name='Polices', description='The private access policies.'),
  requestId?: string(name='RequestId', description='The request ID.', example='748CFDC7-1EB6-5B8B-9405-DA76ED5BB60D'),
  totalNum?: int32(name='TotalNum', description='The total number of private access policies.', example='1'),
}

model ListPrivateAccessPolicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPrivateAccessPolicesResponseBody(name='body'),
}

/**
 * @summary Queries the private access policies within the current Alibaba Cloud account.
 *
 * @param request ListPrivateAccessPolicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPrivateAccessPolicesResponse
 */
async function listPrivateAccessPolicesWithOptions(request: ListPrivateAccessPolicesRequest, runtime: $RuntimeOptions): ListPrivateAccessPolicesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPrivateAccessPolices',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the private access policies within the current Alibaba Cloud account.
 *
 * @param request ListPrivateAccessPolicesRequest
 * @return ListPrivateAccessPolicesResponse
 */
async function listPrivateAccessPolices(request: ListPrivateAccessPolicesRequest): ListPrivateAccessPolicesResponse {
  var runtime = new $RuntimeOptions{};
  return listPrivateAccessPolicesWithOptions(request, runtime);
}

model ListPrivateAccessTagsRequest {
  applicationId?: string(name='ApplicationId', description='The ID of the internal access application. You can obtain the application ID by calling the following operations:

*   [ListPrivateAccessApplications](~~ListPrivateAccessApplications~~): queries all internal access applications.
*   [CreatePrivateAccessApplication](~~CreatePrivateAccessApplication~~): creates an internal access application.', example='pa-application-e12860ef6c48****'),
  currentPage?: int32(name='CurrentPage', description='The page number. Valid values: 1 to 10000.

This parameter is required.', example='1'),
  name?: string(name='Name', description='The name of the internal access tag. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-).', example='tag_name'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Valid values: 1 to 1000.

This parameter is required.', example='10'),
  policyId?: string(name='PolicyId', description='The ID of the internal access policy. You can obtain the policy ID by calling the following operations:

*   [ListPrivateAccessPolices](~~ListPrivateAccessPolices~~): queries all internal access policies.
*   [CreatePrivateAccessPolicy](~~CreatePrivateAccessPolicy~~): creates an internal access policy.', example='pa-policy-54a7838a48bf****'),
  simpleMode?: boolean(name='SimpleMode', description='Specifies whether to enable the simple query mode. A value of true specifies that policy IDs are not queried.', example='true'),
  tagIds?: [ string ](name='TagIds', description='The IDs of internal access tags. You can specify up to 100 tag IDs.'),
}

model ListPrivateAccessTagsResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='54C1D236-CDB9-586C-B44D-AFDCEA195545'),
  tags?: [ 
    {
      applicationIds?: [ string ](name='ApplicationIds', description='The IDs of the internal access applications.'),
      createTime?: string(name='CreateTime', description='The time when the internal access tag was created.', example='2022-10-10 11:39:34'),
      description?: string(name='Description', description='The description of the internal access tag.'),
      name?: string(name='Name', description='The name of the internal access tag.', example='tag_name'),
      policyIds?: [ string ](name='PolicyIds', description='The IDs of the internal access policies.'),
      tagId?: string(name='TagId', description='The ID of the internal access tag.', example='tag-d3f64e8bdd4a****'),
      tagType?: string(name='TagType', description='The type of the internal access tag. Valid values:

*   **Default**
*   **Custom**', example='Default'),
    }
  ](name='Tags', description='The internal access tags.'),
  totalNum?: int32(name='TotalNum', description='The total number of internal access tags.', example='1'),
}

model ListPrivateAccessTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPrivateAccessTagsResponseBody(name='body'),
}

/**
 * @summary Queries the information about all internal access tags within the current Alibaba Cloud account.
 *
 * @param request ListPrivateAccessTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPrivateAccessTagsResponse
 */
async function listPrivateAccessTagsWithOptions(request: ListPrivateAccessTagsRequest, runtime: $RuntimeOptions): ListPrivateAccessTagsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPrivateAccessTags',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the information about all internal access tags within the current Alibaba Cloud account.
 *
 * @param request ListPrivateAccessTagsRequest
 * @return ListPrivateAccessTagsResponse
 */
async function listPrivateAccessTags(request: ListPrivateAccessTagsRequest): ListPrivateAccessTagsResponse {
  var runtime = new $RuntimeOptions{};
  return listPrivateAccessTagsWithOptions(request, runtime);
}

model ListPrivateAccessTagsForDynamicRouteRequest {
  dynamicRouteIds?: [ string ](name='DynamicRouteIds', description='This parameter is required.'),
}

model ListPrivateAccessTagsForDynamicRouteResponseBody = {
  dynamicRoutes?: [ 
    {
      dynamicRouteId?: string(name='DynamicRouteId', example='dr-ca9fddfac7c6****'),
      tags?: [ 
        {
          createTime?: string(name='CreateTime', example='2022-10-23 14:02:56'),
          description?: string(name='Description'),
          name?: string(name='Name', example='tag_name'),
          tagId?: string(name='TagId', example='tag-d3f64e8bdd4a****'),
          tagType?: string(name='TagType', example='Custom'),
        }
      ](name='Tags'),
    }
  ](name='DynamicRoutes'),
  requestId?: string(name='RequestId', example='B608C6AE-623D-55C4-9454-601B88AE937E'),
}

model ListPrivateAccessTagsForDynamicRouteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPrivateAccessTagsForDynamicRouteResponseBody(name='body'),
}

/**
 * @summary 批量查询动态路由的内网访问标签
 *
 * @param request ListPrivateAccessTagsForDynamicRouteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPrivateAccessTagsForDynamicRouteResponse
 */
async function listPrivateAccessTagsForDynamicRouteWithOptions(request: ListPrivateAccessTagsForDynamicRouteRequest, runtime: $RuntimeOptions): ListPrivateAccessTagsForDynamicRouteResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPrivateAccessTagsForDynamicRoute',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询动态路由的内网访问标签
 *
 * @param request ListPrivateAccessTagsForDynamicRouteRequest
 * @return ListPrivateAccessTagsForDynamicRouteResponse
 */
async function listPrivateAccessTagsForDynamicRoute(request: ListPrivateAccessTagsForDynamicRouteRequest): ListPrivateAccessTagsForDynamicRouteResponse {
  var runtime = new $RuntimeOptions{};
  return listPrivateAccessTagsForDynamicRouteWithOptions(request, runtime);
}

model ListRegistrationPoliciesRequest {
  companyLimitType?: string(name='CompanyLimitType', example='LimitAll'),
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  matchMode?: string(name='MatchMode', example='UserGroupAll'),
  name?: string(name='Name', example='registration_policy_name'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  personalLimitType?: string(name='PersonalLimitType', example='LimitDiff'),
  policyIds?: [ string ](name='PolicyIds'),
  status?: string(name='Status', example='Enabled'),
  userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
}

model ListRegistrationPoliciesResponseBody = {
  policies?: [ 
    {
      createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
      description?: string(name='Description'),
      limitDetail?: [ 
        {
          deviceBelong?: string(name='DeviceBelong', example='Company'),
          limitCount?: {
            all?: int32(name='All', example='3'),
            mobile?: int32(name='Mobile', example='0'),
            PC?: int32(name='PC', example='0'),
          }(name='LimitCount'),
          limitType?: string(name='LimitType', example='LimitAll'),
        }
      ](name='LimitDetail'),
      matchMode?: string(name='MatchMode', example='UserGroupNormal'),
      name?: string(name='Name', example='registration_policy_name'),
      policyId?: string(name='PolicyId', example='reg-policy-dcbfd33cb004****'),
      priority?: long(name='Priority', example='1'),
      status?: string(name='Status', example='Enabled'),
      userGroupIds?: [ string ](name='UserGroupIds'),
      whitelist?: [ string ](name='Whitelist'),
    }
  ](name='Policies'),
  requestId?: string(name='RequestId', example='7A8FE38A-E29C-5678-B84A-FEDBCB83552F'),
  totalNum?: string(name='TotalNum', example='1'),
}

model ListRegistrationPoliciesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRegistrationPoliciesResponseBody(name='body'),
}

/**
 * @summary 查询用户设备注册策略列表
 *
 * @param request ListRegistrationPoliciesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRegistrationPoliciesResponse
 */
async function listRegistrationPoliciesWithOptions(request: ListRegistrationPoliciesRequest, runtime: $RuntimeOptions): ListRegistrationPoliciesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRegistrationPolicies',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户设备注册策略列表
 *
 * @param request ListRegistrationPoliciesRequest
 * @return ListRegistrationPoliciesResponse
 */
async function listRegistrationPolicies(request: ListRegistrationPoliciesRequest): ListRegistrationPoliciesResponse {
  var runtime = new $RuntimeOptions{};
  return listRegistrationPoliciesWithOptions(request, runtime);
}

model ListRegistrationPoliciesForUserGroupRequest {
  userGroupIds?: [ string ](name='UserGroupIds', description='This parameter is required.'),
}

model ListRegistrationPoliciesForUserGroupResponseBody = {
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  userGroups?: [ 
    {
      policies?: [ 
        {
          createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
          description?: string(name='Description'),
          limitDetail?: [ 
            {
              deviceBelong?: string(name='DeviceBelong', example='Company'),
              limitCount?: {
                all?: string(name='All', example='3'),
                mobile?: string(name='Mobile', example='0'),
                PC?: string(name='PC', example='0'),
              }(name='LimitCount'),
              limitType?: string(name='LimitType', example='LimitAll'),
            }
          ](name='LimitDetail'),
          matchMode?: string(name='MatchMode', example='UserGroupNormal'),
          name?: string(name='Name', example='registration_policy_name'),
          policyId?: string(name='PolicyId', example='reg-policy-dcbfd33cb004****'),
          priority?: long(name='Priority', example='1'),
          status?: string(name='Status', example='Enabled'),
          whitelist?: [ string ](name='Whitelist'),
        }
      ](name='Policies'),
      userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
    }
  ](name='UserGroups'),
}

model ListRegistrationPoliciesForUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRegistrationPoliciesForUserGroupResponseBody(name='body'),
}

/**
 * @summary 查询用户组相关的设备注册策略
 *
 * @param request ListRegistrationPoliciesForUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRegistrationPoliciesForUserGroupResponse
 */
async function listRegistrationPoliciesForUserGroupWithOptions(request: ListRegistrationPoliciesForUserGroupRequest, runtime: $RuntimeOptions): ListRegistrationPoliciesForUserGroupResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRegistrationPoliciesForUserGroup',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户组相关的设备注册策略
 *
 * @param request ListRegistrationPoliciesForUserGroupRequest
 * @return ListRegistrationPoliciesForUserGroupResponse
 */
async function listRegistrationPoliciesForUserGroup(request: ListRegistrationPoliciesForUserGroupRequest): ListRegistrationPoliciesForUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return listRegistrationPoliciesForUserGroupWithOptions(request, runtime);
}

model ListSoftwareForUserDeviceRequest {
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  deviceTag?: string(name='DeviceTag', description='This parameter is required.', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
}

model ListSoftwareForUserDeviceResponseBody = {
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
  software?: [ 
    {
      inc?: string(name='Inc', example='Alibaba (China) Network Technology Co.,Ltd.'),
      installTime?: string(name='InstallTime', example='2023-08-18 02:43:02'),
      name?: string(name='Name'),
      versions?: [ string ](name='Versions'),
    }
  ](name='Software'),
  totalNum?: long(name='TotalNum', example='1'),
}

model ListSoftwareForUserDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSoftwareForUserDeviceResponseBody(name='body'),
}

/**
 * @summary 批量查询终端安装软件列表
 *
 * @param request ListSoftwareForUserDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSoftwareForUserDeviceResponse
 */
async function listSoftwareForUserDeviceWithOptions(request: ListSoftwareForUserDeviceRequest, runtime: $RuntimeOptions): ListSoftwareForUserDeviceResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListSoftwareForUserDevice',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询终端安装软件列表
 *
 * @param request ListSoftwareForUserDeviceRequest
 * @return ListSoftwareForUserDeviceResponse
 */
async function listSoftwareForUserDevice(request: ListSoftwareForUserDeviceRequest): ListSoftwareForUserDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return listSoftwareForUserDeviceWithOptions(request, runtime);
}

model ListTagsForPrivateAccessApplicationRequest {
  applicationIds?: [ string ](name='ApplicationIds', description='This parameter is required.'),
}

model ListTagsForPrivateAccessApplicationResponseBody = {
  applications?: [ 
    {
      applicationId?: string(name='ApplicationId', example='pa-application-7a4445897856****'),
      tags?: [ 
        {
          createTime?: string(name='CreateTime', example='2022-07-01 16:05:26'),
          description?: string(name='Description'),
          name?: string(name='Name', example='tag_name'),
          tagId?: string(name='TagId', example='tag-c0cb77857a99****'),
          tagType?: string(name='TagType', example='Default'),
        }
      ](name='Tags'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='7241F45B-E8D3-5BA3-8172-8A58AC2AB0FC'),
}

model ListTagsForPrivateAccessApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagsForPrivateAccessApplicationResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问应用的标签
 *
 * @param request ListTagsForPrivateAccessApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagsForPrivateAccessApplicationResponse
 */
async function listTagsForPrivateAccessApplicationWithOptions(request: ListTagsForPrivateAccessApplicationRequest, runtime: $RuntimeOptions): ListTagsForPrivateAccessApplicationResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListTagsForPrivateAccessApplication',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问应用的标签
 *
 * @param request ListTagsForPrivateAccessApplicationRequest
 * @return ListTagsForPrivateAccessApplicationResponse
 */
async function listTagsForPrivateAccessApplication(request: ListTagsForPrivateAccessApplicationRequest): ListTagsForPrivateAccessApplicationResponse {
  var runtime = new $RuntimeOptions{};
  return listTagsForPrivateAccessApplicationWithOptions(request, runtime);
}

model ListTagsForPrivateAccessPolicyRequest {
  policyIds?: [ string ](name='PolicyIds', description='This parameter is required.'),
}

model ListTagsForPrivateAccessPolicyResponseBody = {
  polices?: [ 
    {
      policyId?: string(name='PolicyId', example='pa-policy-1b0d0e8b4bcf****'),
      tags?: [ 
        {
          createTime?: string(name='CreateTime', description='内网访问标签创建时间。', example='2023-02-21 14:10:16'),
          description?: string(name='Description'),
          name?: string(name='Name', example='tag_name'),
          tagId?: string(name='TagId', example='tag-d3f64e8bdd4a****'),
          tagType?: string(name='TagType', example='Default'),
        }
      ](name='Tags'),
    }
  ](name='Polices'),
  requestId?: string(name='RequestId', example='9EE61139-A6A8-5E13-80AF-83435C21B26B'),
}

model ListTagsForPrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagsForPrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问策略的标签
 *
 * @param request ListTagsForPrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagsForPrivateAccessPolicyResponse
 */
async function listTagsForPrivateAccessPolicyWithOptions(request: ListTagsForPrivateAccessPolicyRequest, runtime: $RuntimeOptions): ListTagsForPrivateAccessPolicyResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListTagsForPrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问策略的标签
 *
 * @param request ListTagsForPrivateAccessPolicyRequest
 * @return ListTagsForPrivateAccessPolicyResponse
 */
async function listTagsForPrivateAccessPolicy(request: ListTagsForPrivateAccessPolicyRequest): ListTagsForPrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return listTagsForPrivateAccessPolicyWithOptions(request, runtime);
}

model ListUninstallApplicationsRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  department?: string(name='Department'),
  hostname?: string(name='Hostname', example='win10-64bit'),
  mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  statuses?: [ string ](name='Statuses'),
  username?: string(name='Username'),
}

model ListUninstallApplicationsResponseBody = {
  applications?: [ 
    {
      applicationId?: string(name='ApplicationId', example='uninstall-app-6646831ac314****'),
      createTime?: string(name='CreateTime', example='2023-07-17 18:46:55'),
      department?: string(name='Department'),
      devTag?: string(name='DevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      devType?: string(name='DevType', example='Windows'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      idpName?: string(name='IdpName'),
      isUninstall?: boolean(name='IsUninstall', example='false'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      reason?: string(name='Reason'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      status?: string(name='Status', example='Approved'),
      username?: string(name='Username'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: long(name='TotalNum', example='1'),
}

model ListUninstallApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUninstallApplicationsResponseBody(name='body'),
}

/**
 * @summary 列表查询卸载申请列表
 *
 * @param request ListUninstallApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUninstallApplicationsResponse
 */
async function listUninstallApplicationsWithOptions(request: ListUninstallApplicationsRequest, runtime: $RuntimeOptions): ListUninstallApplicationsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUninstallApplications',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列表查询卸载申请列表
 *
 * @param request ListUninstallApplicationsRequest
 * @return ListUninstallApplicationsResponse
 */
async function listUninstallApplications(request: ListUninstallApplicationsRequest): ListUninstallApplicationsResponse {
  var runtime = new $RuntimeOptions{};
  return listUninstallApplicationsWithOptions(request, runtime);
}

model ListUserApplicationsRequest {
  currentPage?: int32(name='CurrentPage', description='This parameter is required.', example='1'),
  name?: string(name='Name', example='private_access_application_name'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  saseUserId?: string(name='SaseUserId', description='This parameter is required.', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
}

model ListUserApplicationsResponseBody = {
  applications?: [ 
    {
      action?: string(name='Action', example='Block'),
      addresses?: [ string ](name='Addresses'),
      applicationId?: string(name='ApplicationId', example='pa-application-b927baf3e592****'),
      name?: string(name='Name', example='private_access_application_name'),
      portRanges?: [ 
        {
          begin?: string(name='Begin', example='80'),
          end?: string(name='End', example='81'),
        }
      ](name='PortRanges'),
      protocol?: string(name='Protocol', example='TCP'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', description='Id of the request', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
  totalNum?: int32(name='TotalNum', example='20'),
}

model ListUserApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserApplicationsResponseBody(name='body'),
}

/**
 * @summary 列表查询用户应用权限
 *
 * @param request ListUserApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserApplicationsResponse
 */
async function listUserApplicationsWithOptions(request: ListUserApplicationsRequest, runtime: $RuntimeOptions): ListUserApplicationsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserApplications',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列表查询用户应用权限
 *
 * @param request ListUserApplicationsRequest
 * @return ListUserApplicationsResponse
 */
async function listUserApplications(request: ListUserApplicationsRequest): ListUserApplicationsResponse {
  var runtime = new $RuntimeOptions{};
  return listUserApplicationsWithOptions(request, runtime);
}

model ListUserDevicesRequest {
  appStatuses?: [ string ](name='AppStatuses'),
  appVersions?: [ string ](name='AppVersions'),
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  department?: string(name='Department'),
  deviceBelong?: string(name='DeviceBelong', example='Company'),
  deviceStatuses?: [ string ](name='DeviceStatuses'),
  deviceTags?: [ string ](name='DeviceTags'),
  deviceTypes?: [ string ](name='DeviceTypes'),
  dlpStatuses?: [ string ](name='DlpStatuses'),
  hostname?: string(name='Hostname', example='win10-64bit'),
  iaStatuses?: [ string ](name='IaStatuses'),
  innerIp?: string(name='InnerIp'),
  mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
  nacStatuses?: [ string ](name='NacStatuses'),
  paStatuses?: [ string ](name='PaStatuses'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
  sharingStatus?: boolean(name='SharingStatus', example='true'),
  sortBy?: string(name='SortBy'),
  username?: string(name='Username'),
  workshop?: string(name='Workshop'),
}

model ListUserDevicesResponseBody = {
  devices?: [ 
    {
      appStatus?: string(name='AppStatus', example='Online'),
      appVersion?: string(name='AppVersion', example='2.2.0'),
      CPU?: string(name='CPU', example='Apple M1'),
      createTime?: string(name='CreateTime', example='2023-07-17 18:46:55'),
      department?: string(name='Department'),
      deviceBelong?: string(name='DeviceBelong', example='Company'),
      deviceModel?: string(name='DeviceModel', example='MacBookPro17,1'),
      deviceStatus?: string(name='DeviceStatus', example='Online'),
      deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      deviceType?: string(name='DeviceType', example='Windows'),
      deviceVersion?: string(name='DeviceVersion', example='3.5.1'),
      disk?: string(name='Disk', example='APPLE SSD AP0512Q Media'),
      dlpStatus?: string(name='DlpStatus', example='Enabled'),
      edrStatus?: string(name='EdrStatus'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      iaStatus?: string(name='IaStatus', example='Enabled'),
      innerIP?: string(name='InnerIP', example='192.168.XX.XX'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      memory?: string(name='Memory', example='16'),
      nacStatus?: string(name='NacStatus', example='Enabled'),
      netInterfaceInfo?: [ 
        {
          mac?: string(name='Mac'),
          name?: string(name='Name'),
        }
      ](name='NetInterfaceInfo'),
      paStatus?: string(name='PaStatus', example='Enabled'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      sharingStatus?: boolean(name='SharingStatus', example='true'),
      srcIP?: string(name='SrcIP', example='11.49.XX.XX'),
      updateTime?: string(name='UpdateTime', example='2023-08-24 19:04:42'),
      username?: string(name='Username'),
      workshop?: string(name='Workshop'),
    }
  ](name='Devices'),
  requestId?: string(name='RequestId', example='5FEF5CFA-14CC-5DE5-BD1F-AFFE0996E71D'),
  totalNum?: long(name='TotalNum', example='1'),
}

model ListUserDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserDevicesResponseBody(name='body'),
}

/**
 * @summary 批量查询用户设备列表
 *
 * @param request ListUserDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserDevicesResponse
 */
async function listUserDevicesWithOptions(request: ListUserDevicesRequest, runtime: $RuntimeOptions): ListUserDevicesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserDevices',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询用户设备列表
 *
 * @param request ListUserDevicesRequest
 * @return ListUserDevicesResponse
 */
async function listUserDevices(request: ListUserDevicesRequest): ListUserDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return listUserDevicesWithOptions(request, runtime);
}

model ListUserGroupsRequest {
  attributeValue?: string(name='AttributeValue', example='username'),
  currentPage?: int32(name='CurrentPage', description='This parameter is required.', example='1'),
  name?: string(name='Name', description='用户组名称。长度为1~128个字符，支持中文和大小写英文字母，可包含数字、半角句号（.）、下划线（_）和短划线（-）。', example='user_group_name'),
  PAPolicyId?: string(name='PAPolicyId', example='pa-policy-54a7838a48bf****'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  userGroupIds?: [ string ](name='UserGroupIds'),
}

model ListUserGroupsResponseBody = {
  requestId?: string(name='RequestId', example='4AB972E2-D702-5464-B132-B1911498B8BF'),
  totalNum?: int32(name='TotalNum', example='1'),
  userGroups?: [ 
    {
      attributes?: [ 
        {
          idpId?: int32(name='IdpId', example='12'),
          relation?: string(name='Relation', example='Equal'),
          userGroupType?: string(name='UserGroupType', example='department'),
          value?: string(name='Value'),
        }
      ](name='Attributes'),
      createTime?: string(name='CreateTime', example='2022-10-10 11:39:22'),
      description?: string(name='Description'),
      name?: string(name='Name', example='user_group_name'),
      userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
    }
  ](name='UserGroups'),
}

model ListUserGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGroupsResponseBody(name='body'),
}

/**
 * @summary 批量查询用户组
 *
 * @param request ListUserGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGroupsResponse
 */
async function listUserGroupsWithOptions(request: ListUserGroupsRequest, runtime: $RuntimeOptions): ListUserGroupsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserGroups',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询用户组
 *
 * @param request ListUserGroupsRequest
 * @return ListUserGroupsResponse
 */
async function listUserGroups(request: ListUserGroupsRequest): ListUserGroupsResponse {
  var runtime = new $RuntimeOptions{};
  return listUserGroupsWithOptions(request, runtime);
}

model ListUserGroupsForPrivateAccessPolicyRequest {
  policyIds?: [ string ](name='PolicyIds', description='This parameter is required.'),
}

model ListUserGroupsForPrivateAccessPolicyResponseBody = {
  polices?: [ 
    {
      policyId?: string(name='PolicyId', example='pa-policy-1b0d0e8b4bcf****'),
      userGroups?: [ 
        {
          attributes?: [ 
            {
              idpId?: int32(name='IdpId', example='12'),
              relation?: string(name='Relation', example='Equal'),
              userGroupType?: string(name='UserGroupType', example='department'),
              value?: string(name='Value'),
            }
          ](name='Attributes'),
          createTime?: string(name='CreateTime', description='用户组创建时间。', example='2022-09-27 18:10:25'),
          description?: string(name='Description'),
          name?: string(name='Name', example='user_group_name'),
          userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
        }
      ](name='UserGroups'),
    }
  ](name='Polices'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model ListUserGroupsForPrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGroupsForPrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 批量查询内网访问策略的用户组
 *
 * @param request ListUserGroupsForPrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGroupsForPrivateAccessPolicyResponse
 */
async function listUserGroupsForPrivateAccessPolicyWithOptions(request: ListUserGroupsForPrivateAccessPolicyRequest, runtime: $RuntimeOptions): ListUserGroupsForPrivateAccessPolicyResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserGroupsForPrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询内网访问策略的用户组
 *
 * @param request ListUserGroupsForPrivateAccessPolicyRequest
 * @return ListUserGroupsForPrivateAccessPolicyResponse
 */
async function listUserGroupsForPrivateAccessPolicy(request: ListUserGroupsForPrivateAccessPolicyRequest): ListUserGroupsForPrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return listUserGroupsForPrivateAccessPolicyWithOptions(request, runtime);
}

model ListUserGroupsForRegistrationPolicyRequest {
  policyIds?: [ string ](name='PolicyIds', description='This parameter is required.'),
}

model ListUserGroupsForRegistrationPolicyResponseBody = {
  policies?: [ 
    {
      policyId?: string(name='PolicyId', example='reg-policy-f25c9e5872e5****'),
      userGroups?: [ 
        {
          attributes?: [ 
            {
              idpId?: int32(name='IdpId', example='12'),
              relation?: string(name='Relation', example='Equal'),
              userGroupType?: string(name='UserGroupType', example='department'),
              value?: string(name='Value'),
            }
          ](name='Attributes'),
          createTime?: string(name='CreateTime', example='2022-09-27 18:10:25'),
          description?: string(name='Description'),
          name?: string(name='Name', example='user_group_name'),
          userGroupId?: string(name='UserGroupId', example='usergroup-6f1ef2fc56b6****'),
        }
      ](name='UserGroups'),
    }
  ](name='Policies'),
  requestId?: string(name='RequestId', example='D89009C7-54C6-51B6-BAE7-3F373920C6BF'),
}

model ListUserGroupsForRegistrationPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGroupsForRegistrationPolicyResponseBody(name='body'),
}

/**
 * @summary 查询设备注册策略相关用户组
 *
 * @param request ListUserGroupsForRegistrationPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGroupsForRegistrationPolicyResponse
 */
async function listUserGroupsForRegistrationPolicyWithOptions(request: ListUserGroupsForRegistrationPolicyRequest, runtime: $RuntimeOptions): ListUserGroupsForRegistrationPolicyResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserGroupsForRegistrationPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询设备注册策略相关用户组
 *
 * @param request ListUserGroupsForRegistrationPolicyRequest
 * @return ListUserGroupsForRegistrationPolicyResponse
 */
async function listUserGroupsForRegistrationPolicy(request: ListUserGroupsForRegistrationPolicyRequest): ListUserGroupsForRegistrationPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return listUserGroupsForRegistrationPolicyWithOptions(request, runtime);
}

model ListUserPrivateAccessPoliciesRequest {
  currentPage?: int32(name='CurrentPage', description='This parameter is required.', example='1'),
  name?: string(name='Name', example='private_access_policy_name'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  saseUserId?: string(name='SaseUserId', description='This parameter is required.', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
}

model ListUserPrivateAccessPoliciesResponseBody = {
  polices?: [ 
    {
      customUserAttributes?: [ 
        {
          idpId?: int32(name='IdpId', example='12'),
          relation?: string(name='Relation', example='Equal'),
          userGroupType?: string(name='UserGroupType', example='department'),
          value?: string(name='Value'),
        }
      ](name='CustomUserAttributes'),
      deviceAttributeName?: string(name='DeviceAttributeName', example='device_attribute_name'),
      matchedUserGroup?: string(name='MatchedUserGroup', example='user_group_name'),
      name?: string(name='Name', example='private_access_policy_name'),
      policyAction?: string(name='PolicyAction', example='Allow'),
      policyId?: string(name='PolicyId', example='pa-policy-1b0d0e8b4bcf****'),
      priority?: long(name='Priority', example='1'),
      userGroupMode?: string(name='UserGroupMode', example='Custom'),
    }
  ](name='Polices'),
  requestId?: string(name='RequestId', description='Id of the request', example='9D852F87-AFB5-51B8-AACD-F7D0EFB8277D'),
  totalNum?: int32(name='TotalNum', example='20'),
}

model ListUserPrivateAccessPoliciesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserPrivateAccessPoliciesResponseBody(name='body'),
}

/**
 * @summary 列表查询用户零信任策略
 *
 * @param request ListUserPrivateAccessPoliciesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserPrivateAccessPoliciesResponse
 */
async function listUserPrivateAccessPoliciesWithOptions(request: ListUserPrivateAccessPoliciesRequest, runtime: $RuntimeOptions): ListUserPrivateAccessPoliciesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUserPrivateAccessPolicies',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列表查询用户零信任策略
 *
 * @param request ListUserPrivateAccessPoliciesRequest
 * @return ListUserPrivateAccessPoliciesResponse
 */
async function listUserPrivateAccessPolicies(request: ListUserPrivateAccessPoliciesRequest): ListUserPrivateAccessPoliciesResponse {
  var runtime = new $RuntimeOptions{};
  return listUserPrivateAccessPoliciesWithOptions(request, runtime);
}

model ListUsersRequest {
  currentPage?: long(name='CurrentPage', description='This parameter is required.', example='1'),
  department?: string(name='Department'),
  fuzzyUsername?: string(name='FuzzyUsername'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='10'),
  preciseUsername?: string(name='PreciseUsername'),
  saseUserIds?: [ string ](name='SaseUserIds'),
  status?: string(name='Status', example='Enabled'),
}

model ListUsersResponseBody = {
  requestId?: string(name='RequestId', example='5FEF5CFA-14CC-5DE5-BD1F-AFFE0996E71D'),
  totalNum?: string(name='TotalNum', example='1'),
  users?: [ 
    {
      department?: string(name='Department'),
      email?: string(name='Email', example='a***@example.net'),
      idpName?: string(name='IdpName'),
      phone?: string(name='Phone', example='1381111****'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      status?: string(name='Status', example='Enabled'),
      username?: string(name='Username'),
    }
  ](name='Users'),
}

model ListUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUsersResponseBody(name='body'),
}

/**
 * @summary 列表查询登陆用户
 *
 * @param request ListUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUsersResponse
 */
async function listUsersWithOptions(request: ListUsersRequest, runtime: $RuntimeOptions): ListUsersResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListUsers',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列表查询登陆用户
 *
 * @param request ListUsersRequest
 * @return ListUsersResponse
 */
async function listUsers(request: ListUsersRequest): ListUsersResponse {
  var runtime = new $RuntimeOptions{};
  return listUsersWithOptions(request, runtime);
}

model LookupWmInfoMappingRequest {
  wmInfoSize?: long(name='WmInfoSize', example='32'),
  wmInfoUint?: string(name='WmInfoUint', description='This parameter is required.', example='123***'),
  wmType?: string(name='WmType', description='This parameter is required.', example='PureDocument'),
}

model LookupWmInfoMappingResponseBody = {
  data?: {
    wmInfoBytesB64?: string(name='WmInfoBytesB64', example='aGVsbG8gc2F*****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='7E9D7ACD-53D5-56EF-A913-79D148D06299'),
}

model LookupWmInfoMappingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: LookupWmInfoMappingResponseBody(name='body'),
}

/**
 * @summary 根据数字水印信息查询字符串水印信息
 *
 * @param request LookupWmInfoMappingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return LookupWmInfoMappingResponse
 */
async function lookupWmInfoMappingWithOptions(request: LookupWmInfoMappingRequest, runtime: $RuntimeOptions): LookupWmInfoMappingResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'LookupWmInfoMapping',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据数字水印信息查询字符串水印信息
 *
 * @param request LookupWmInfoMappingRequest
 * @return LookupWmInfoMappingResponse
 */
async function lookupWmInfoMapping(request: LookupWmInfoMappingRequest): LookupWmInfoMappingResponse {
  var runtime = new $RuntimeOptions{};
  return lookupWmInfoMappingWithOptions(request, runtime);
}

model RevokeUserSessionRequest {
  externalIds?: string(name='ExternalIds', description='This parameter is required.', example='12345678'),
  idpId?: string(name='IdpId', description='This parameter is required.', example='idp-cfg9vcrqylo39c39uxnw'),
}

model RevokeUserSessionResponseBody = {
  requestId?: string(name='RequestId', example='D6707286-A50E-57B1-B2CF-EFAC59E850D8'),
}

model RevokeUserSessionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RevokeUserSessionResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI RevokeUserSession is deprecated
 *
 * @summary 吊销用户登录会话
 *
 * @param request RevokeUserSessionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RevokeUserSessionResponse
 */
// Deprecated
async function revokeUserSessionWithOptions(request: RevokeUserSessionRequest, runtime: $RuntimeOptions): RevokeUserSessionResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.externalIds)) {
    query['ExternalIds'] = request.externalIds;
  }
  if (!$isNull(request.idpId)) {
    query['IdpId'] = request.idpId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RevokeUserSession',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI RevokeUserSession is deprecated
 *
 * @summary 吊销用户登录会话
 *
 * @param request RevokeUserSessionRequest
 * @return RevokeUserSessionResponse
 */
// Deprecated
async function revokeUserSession(request: RevokeUserSessionRequest): RevokeUserSessionResponse {
  var runtime = new $RuntimeOptions{};
  return revokeUserSessionWithOptions(request, runtime);
}

model UpdateApprovalProcessRequest {
  description?: string(name='Description'),
  matchSchemas?: {
    appUninstallSchemaId?: string(name='AppUninstallSchemaId', example='approval-schema-090134f1ebff****'),
    deviceRegistrationSchemaId?: string(name='DeviceRegistrationSchemaId', example='approval-schema-090134f1ebff****'),
    dlpSendSchemaId?: string(name='DlpSendSchemaId', example='approval-schema-090134f1ebff****'),
    domainBlacklistSchemaId?: string(name='DomainBlacklistSchemaId', example='approval-schema-090134f1ebff****'),
    domainWhitelistSchemaId?: string(name='DomainWhitelistSchemaId', example='approval-schema-090134f1ebff****'),
    endpointHardeningSchemaId?: string(name='EndpointHardeningSchemaId'),
    peripheralBlockSchemaId?: string(name='PeripheralBlockSchemaId', example='approval-schema-090134f1ebff****'),
    softwareBlockSchemaId?: string(name='SoftwareBlockSchemaId', example='approval-schema-090134f1ebff****'),
    softwareHardeningSchemaId?: string(name='SoftwareHardeningSchemaId'),
  }(name='MatchSchemas'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='approval-process-f16bf74b2b29****'),
  processName?: string(name='ProcessName'),
  processNodes?: [[ string ]  ](name='ProcessNodes'),
}

model UpdateApprovalProcessShrinkRequest {
  description?: string(name='Description'),
  matchSchemasShrink?: string(name='MatchSchemas'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='approval-process-f16bf74b2b29****'),
  processName?: string(name='ProcessName'),
  processNodes?: [[ string ]  ](name='ProcessNodes'),
}

model UpdateApprovalProcessResponseBody = {
  process?: {
    appUninstallPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='AppUninstallPolicies'),
    createTime?: string(name='CreateTime', example='2022-07-11 15:31:39'),
    description?: string(name='Description'),
    deviceRegistrationPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DeviceRegistrationPolicies'),
    dlpSendPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DlpSendPolicies'),
    domainBlacklistPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DomainBlacklistPolicies'),
    domainWhitelistPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='DomainWhitelistPolicies'),
    endpointHardeningPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId'),
    }(name='EndpointHardeningPolicies'),
    peripheraBlockPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='PeripheraBlockPolicies'),
    processId?: string(name='ProcessId', example='approval-process-2677fcf063f5****'),
    processName?: string(name='ProcessName'),
    processNodes?: [[ 
      {
        saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
        username?: string(name='Username'),
      }
    ]    ](name='ProcessNodes'),
    softwareBlockPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
    }(name='SoftwareBlockPolicies'),
    softwareHardeningPolicies?: {
      policyIds?: [ string ](name='PolicyIds'),
      schemaId?: string(name='SchemaId'),
    }(name='SoftwareHardeningPolicies'),
  }(name='Process'),
  requestId?: string(name='RequestId', example='7E9D7ACD-53D5-56EF-A913-79D148D06299'),
}

model UpdateApprovalProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateApprovalProcessResponseBody(name='body'),
}

/**
 * @summary 更新审批流程
 *
 * @param tmpReq UpdateApprovalProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateApprovalProcessResponse
 */
async function updateApprovalProcessWithOptions(tmpReq: UpdateApprovalProcessRequest, runtime: $RuntimeOptions): UpdateApprovalProcessResponse {
  tmpReq.validate();
  var request = new UpdateApprovalProcessShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.matchSchemas)) {
    request.matchSchemasShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.matchSchemas, 'MatchSchemas', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.matchSchemasShrink)) {
    body['MatchSchemas'] = request.matchSchemasShrink;
  }
  if (!$isNull(request.processId)) {
    body['ProcessId'] = request.processId;
  }
  if (!$isNull(request.processName)) {
    body['ProcessName'] = request.processName;
  }
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.processNodes)) {
    bodyFlat['ProcessNodes'] = request.processNodes;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateApprovalProcess',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新审批流程
 *
 * @param request UpdateApprovalProcessRequest
 * @return UpdateApprovalProcessResponse
 */
async function updateApprovalProcess(request: UpdateApprovalProcessRequest): UpdateApprovalProcessResponse {
  var runtime = new $RuntimeOptions{};
  return updateApprovalProcessWithOptions(request, runtime);
}

model UpdateApprovalStatusRequest {
  approvalId?: string(name='ApprovalId', description='This parameter is required.', example='approval-872b5e911b35****'),
  status?: string(name='Status', description='This parameter is required.', example='Approved'),
}

model UpdateApprovalStatusResponseBody = {
  approval?: [ 
    {
      approvalDetail?: string(name='ApprovalDetail'),
      approvalId?: string(name='ApprovalId', example='approval-165e6738ad9d****'),
      approvalProgresses?: [ 
        {
          action?: string(name='Action', example='Approve'),
          comment?: string(name='Comment'),
          executor?: string(name='Executor', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
          operators?: [ 
            {
              saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
              username?: string(name='Username'),
            }
          ](name='Operators'),
          status?: string(name='Status', example='Approved'),
          timestamp?: long(name='Timestamp', example='1736752000'),
        }
      ](name='ApprovalProgresses'),
      createTime?: string(name='CreateTime', example='2022-11-15 22:11:55'),
      creatorDevTag?: string(name='CreatorDevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      creatorUserId?: string(name='CreatorUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      endTimestamp?: long(name='EndTimestamp', example='1757952000'),
      policyType?: string(name='PolicyType', example='DlpSend'),
      processId?: string(name='ProcessId', example='approval-process-fcc351b8a95b****'),
      processName?: string(name='ProcessName'),
      reason?: string(name='Reason'),
      schemaContent?: string(name='SchemaContent', example='{"form": {"labelCol": 6,"wrapperCol": 12}}'),
      schemaId?: string(name='SchemaId', example='approval-schema-090134f1ebff****'),
      schemaName?: string(name='SchemaName'),
      status?: string(name='Status', example='Pending'),
    }
  ](name='Approval'),
  requestId?: string(name='RequestId', example='58D6B23E-E5DA-5418-8F61-51A3B5A30049'),
}

model UpdateApprovalStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateApprovalStatusResponseBody(name='body'),
}

/**
 * @summary 修改审批状态
 *
 * @param request UpdateApprovalStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateApprovalStatusResponse
 */
async function updateApprovalStatusWithOptions(request: UpdateApprovalStatusRequest, runtime: $RuntimeOptions): UpdateApprovalStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.approvalId)) {
    query['ApprovalId'] = request.approvalId;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateApprovalStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改审批状态
 *
 * @param request UpdateApprovalStatusRequest
 * @return UpdateApprovalStatusResponse
 */
async function updateApprovalStatus(request: UpdateApprovalStatusRequest): UpdateApprovalStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateApprovalStatusWithOptions(request, runtime);
}

model UpdateBootAndAntiUninstallPolicyRequest {
  allowReport?: boolean(name='AllowReport', example='true'),
  blockContent?: {
    blockTextEn?: {
      content?: string(name='Content', example='After uninstalling, the device can no longer be used for company work, and it will lose access to the company\\\\"s intranet!'),
      mainButtonText?: string(name='MainButtonText', example='Report'),
      minorButtonText?: string(name='MinorButtonText', example='Ignore'),
      title?: string(name='Title', example='Anti-Uninstall Warning'),
    }(name='BlockTextEn'),
    blockTextZh?: {
      content?: string(name='Content'),
      mainButtonText?: string(name='MainButtonText'),
      minorButtonText?: string(name='MinorButtonText'),
      title?: string(name='Title'),
    }(name='BlockTextZh'),
  }(name='BlockContent'),
  isAntiUninstall?: boolean(name='IsAntiUninstall', example='true'),
  isBoot?: boolean(name='IsBoot', example='true'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelistUsers?: [ string ](name='WhitelistUsers'),
}

model UpdateBootAndAntiUninstallPolicyShrinkRequest {
  allowReport?: boolean(name='AllowReport', example='true'),
  blockContentShrink?: string(name='BlockContent'),
  isAntiUninstall?: boolean(name='IsAntiUninstall', example='true'),
  isBoot?: boolean(name='IsBoot', example='true'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelistUsers?: [ string ](name='WhitelistUsers'),
}

model UpdateBootAndAntiUninstallPolicyResponseBody = {
  requestId?: string(name='RequestId', example='CB67D866-1E54-5106-89DF-6D70C73E5989'),
  strategy?: {
    allowReport?: boolean(name='AllowReport', example='true'),
    blockContent?: {
      blockTextEn?: {
        content?: string(name='Content', example='After uninstalling, the device can no longer be used for company work, and it will lose access to the company\\\\"s intranet!'),
        mainButtonText?: string(name='MainButtonText', example='Report'),
        minorButtonText?: string(name='MinorButtonText', example='Ignore'),
        title?: string(name='Title', example='Anti-Uninstall Warning'),
      }(name='BlockTextEn'),
      blockTextZh?: {
        content?: string(name='Content'),
        mainButtonText?: string(name='MainButtonText'),
        minorButtonText?: string(name='MinorButtonText'),
        title?: string(name='Title'),
      }(name='BlockTextZh'),
    }(name='BlockContent'),
    createTime?: string(name='CreateTime', example='2023-04-16 10:50:05'),
    isAntiUninstall?: boolean(name='IsAntiUninstall', example='true'),
    isBoot?: boolean(name='IsBoot', example='true'),
    policyId?: string(name='PolicyId', example='auto-boot-anti-uninstall-6f6cbf5f6605****'),
    reportProcessId?: string(name='ReportProcessId', example='approval-process-65c255598826****'),
    updateTime?: string(name='UpdateTime', example='2024-06-14 10:17:14'),
    userGroupIds?: [ string ](name='UserGroupIds'),
    whitelistUsers?: [ string ](name='WhitelistUsers'),
  }(name='Strategy'),
}

model UpdateBootAndAntiUninstallPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateBootAndAntiUninstallPolicyResponseBody(name='body'),
}

/**
 * @summary 更新自启动与防卸载策略配置
 *
 * @param tmpReq UpdateBootAndAntiUninstallPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateBootAndAntiUninstallPolicyResponse
 */
async function updateBootAndAntiUninstallPolicyWithOptions(tmpReq: UpdateBootAndAntiUninstallPolicyRequest, runtime: $RuntimeOptions): UpdateBootAndAntiUninstallPolicyResponse {
  tmpReq.validate();
  var request = new UpdateBootAndAntiUninstallPolicyShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.blockContent)) {
    request.blockContentShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.blockContent, 'BlockContent', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.allowReport)) {
    body['AllowReport'] = request.allowReport;
  }
  if (!$isNull(request.blockContentShrink)) {
    body['BlockContent'] = request.blockContentShrink;
  }
  if (!$isNull(request.isAntiUninstall)) {
    body['IsAntiUninstall'] = request.isAntiUninstall;
  }
  if (!$isNull(request.isBoot)) {
    body['IsBoot'] = request.isBoot;
  }
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.userGroupIds)) {
    bodyFlat['UserGroupIds'] = request.userGroupIds;
  }
  if (!$isNull(request.whitelistUsers)) {
    bodyFlat['WhitelistUsers'] = request.whitelistUsers;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateBootAndAntiUninstallPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新自启动与防卸载策略配置
 *
 * @param request UpdateBootAndAntiUninstallPolicyRequest
 * @return UpdateBootAndAntiUninstallPolicyResponse
 */
async function updateBootAndAntiUninstallPolicy(request: UpdateBootAndAntiUninstallPolicyRequest): UpdateBootAndAntiUninstallPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return updateBootAndAntiUninstallPolicyWithOptions(request, runtime);
}

model UpdateClientUserRequest {
  departmentId?: string(name='DepartmentId', example='10701'),
  description?: string(name='Description'),
  email?: string(name='Email', example='johndoe@example.com'),
  id?: string(name='Id', description='This parameter is required.', example='20644'),
  mobileNumber?: string(name='MobileNumber', example='13641966835'),
}

model UpdateClientUserResponseBody = {
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model UpdateClientUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateClientUserResponseBody(name='body'),
}

/**
 * @summary 修改自定义身份源指定用户
 *
 * @param request UpdateClientUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateClientUserResponse
 */
async function updateClientUserWithOptions(request: UpdateClientUserRequest, runtime: $RuntimeOptions): UpdateClientUserResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.departmentId)) {
    query['DepartmentId'] = request.departmentId;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.email)) {
    query['Email'] = request.email;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.mobileNumber)) {
    query['MobileNumber'] = request.mobileNumber;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateClientUser',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改自定义身份源指定用户
 *
 * @param request UpdateClientUserRequest
 * @return UpdateClientUserResponse
 */
async function updateClientUser(request: UpdateClientUserRequest): UpdateClientUserResponse {
  var runtime = new $RuntimeOptions{};
  return updateClientUserWithOptions(request, runtime);
}

model UpdateClientUserPasswordRequest {
  id?: string(name='Id', example='1128'),
  password?: string(name='Password', example='kehudiyidj'),
  username?: string(name='Username'),
}

model UpdateClientUserPasswordResponseBody = {
  requestId?: string(name='RequestId', example='EFE7EBB2-449D-5BBB-B381-CA7839BC1649'),
}

model UpdateClientUserPasswordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateClientUserPasswordResponseBody(name='body'),
}

/**
 * @summary 修改自定义身份源指定用户密码
 *
 * @param request UpdateClientUserPasswordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateClientUserPasswordResponse
 */
async function updateClientUserPasswordWithOptions(request: UpdateClientUserPasswordRequest, runtime: $RuntimeOptions): UpdateClientUserPasswordResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.password)) {
    query['Password'] = request.password;
  }
  if (!$isNull(request.username)) {
    query['Username'] = request.username;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateClientUserPassword',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改自定义身份源指定用户密码
 *
 * @param request UpdateClientUserPasswordRequest
 * @return UpdateClientUserPasswordResponse
 */
async function updateClientUserPassword(request: UpdateClientUserPasswordRequest): UpdateClientUserPasswordResponse {
  var runtime = new $RuntimeOptions{};
  return updateClientUserPasswordWithOptions(request, runtime);
}

model UpdateClientUserStatusRequest {
  id?: string(name='Id', description='This parameter is required.', example='1495'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
}

model UpdateClientUserStatusResponseBody = {
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model UpdateClientUserStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateClientUserStatusResponseBody(name='body'),
}

/**
 * @summary 修改自定义身份源指定用户启用状态
 *
 * @param request UpdateClientUserStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateClientUserStatusResponse
 */
async function updateClientUserStatusWithOptions(request: UpdateClientUserStatusRequest, runtime: $RuntimeOptions): UpdateClientUserStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateClientUserStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改自定义身份源指定用户启用状态
 *
 * @param request UpdateClientUserStatusRequest
 * @return UpdateClientUserStatusResponse
 */
async function updateClientUserStatus(request: UpdateClientUserStatusRequest): UpdateClientUserStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateClientUserStatusWithOptions(request, runtime);
}

model UpdateDynamicRouteRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  applicationType?: string(name='ApplicationType', example='Application'),
  description?: string(name='Description'),
  dynamicRouteId?: string(name='DynamicRouteId', description='This parameter is required.', example='dr-ca9fddfac7c6****'),
  dynamicRouteType?: string(name='DynamicRouteType', example='connector'),
  modifyType?: string(name='ModifyType', example='Cover'),
  name?: string(name='Name', example='dynamic_route_name'),
  nextHop?: string(name='NextHop', example='connector-8ccb13b6f52c****'),
  priority?: int32(name='Priority', example='99'),
  regionIds?: [ string ](name='RegionIds'),
  status?: string(name='Status', example='Disabled'),
  tagIds?: [ string ](name='TagIds'),
}

model UpdateDynamicRouteResponseBody = {
  requestId?: string(name='RequestId', example='BE4FB974-11BC-5453-9BE1-1606A73EACA6'),
}

model UpdateDynamicRouteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDynamicRouteResponseBody(name='body'),
}

/**
 * @summary 修改动态路由
 *
 * @param request UpdateDynamicRouteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDynamicRouteResponse
 */
async function updateDynamicRouteWithOptions(request: UpdateDynamicRouteRequest, runtime: $RuntimeOptions): UpdateDynamicRouteResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.applicationIds)) {
    bodyFlat['ApplicationIds'] = request.applicationIds;
  }
  if (!$isNull(request.applicationType)) {
    body['ApplicationType'] = request.applicationType;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.dynamicRouteId)) {
    body['DynamicRouteId'] = request.dynamicRouteId;
  }
  if (!$isNull(request.dynamicRouteType)) {
    body['DynamicRouteType'] = request.dynamicRouteType;
  }
  if (!$isNull(request.modifyType)) {
    body['ModifyType'] = request.modifyType;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.nextHop)) {
    body['NextHop'] = request.nextHop;
  }
  if (!$isNull(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!$isNull(request.regionIds)) {
    bodyFlat['RegionIds'] = request.regionIds;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  if (!$isNull(request.tagIds)) {
    bodyFlat['TagIds'] = request.tagIds;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateDynamicRoute',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改动态路由
 *
 * @param request UpdateDynamicRouteRequest
 * @return UpdateDynamicRouteResponse
 */
async function updateDynamicRoute(request: UpdateDynamicRouteRequest): UpdateDynamicRouteResponse {
  var runtime = new $RuntimeOptions{};
  return updateDynamicRouteWithOptions(request, runtime);
}

model UpdateExcessiveDeviceRegistrationApplicationsStatusRequest {
  applicationIds?: [ string ](name='ApplicationIds', description='This parameter is required.'),
  status?: string(name='Status', description='This parameter is required.', example='Approved'),
}

model UpdateExcessiveDeviceRegistrationApplicationsStatusResponseBody = {
  applications?: [ 
    {
      applicationId?: string(name='ApplicationId', example='reg-application-0f4a127b7e78****'),
      createTime?: string(name='CreateTime', example='2023-07-17 18:46:55'),
      department?: string(name='Department'),
      description?: string(name='Description'),
      deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      deviceType?: string(name='DeviceType', example='Windows'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      isUsed?: boolean(name='IsUsed', example='false'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      status?: string(name='Status', example='Approved'),
      username?: string(name='Username'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
}

model UpdateExcessiveDeviceRegistrationApplicationsStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateExcessiveDeviceRegistrationApplicationsStatusResponseBody(name='body'),
}

/**
 * @summary 批量更新超额注册申请状态
 *
 * @param request UpdateExcessiveDeviceRegistrationApplicationsStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateExcessiveDeviceRegistrationApplicationsStatusResponse
 */
async function updateExcessiveDeviceRegistrationApplicationsStatusWithOptions(request: UpdateExcessiveDeviceRegistrationApplicationsStatusRequest, runtime: $RuntimeOptions): UpdateExcessiveDeviceRegistrationApplicationsStatusResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.applicationIds)) {
    bodyFlat['ApplicationIds'] = request.applicationIds;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateExcessiveDeviceRegistrationApplicationsStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量更新超额注册申请状态
 *
 * @param request UpdateExcessiveDeviceRegistrationApplicationsStatusRequest
 * @return UpdateExcessiveDeviceRegistrationApplicationsStatusResponse
 */
async function updateExcessiveDeviceRegistrationApplicationsStatus(request: UpdateExcessiveDeviceRegistrationApplicationsStatusRequest): UpdateExcessiveDeviceRegistrationApplicationsStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateExcessiveDeviceRegistrationApplicationsStatusWithOptions(request, runtime);
}

model UpdateIdpDepartmentRequest {
  departmentId?: string(name='DepartmentId', description='This parameter is required.', example='10653'),
  departmentName?: string(name='DepartmentName', description='This parameter is required.'),
  idpConfigId?: string(name='IdpConfigId', description='This parameter is required.', example='598'),
}

model UpdateIdpDepartmentResponseBody = {
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
}

model UpdateIdpDepartmentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateIdpDepartmentResponseBody(name='body'),
}

/**
 * @summary 修改指定自定义身份源部门
 *
 * @param request UpdateIdpDepartmentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateIdpDepartmentResponse
 */
async function updateIdpDepartmentWithOptions(request: UpdateIdpDepartmentRequest, runtime: $RuntimeOptions): UpdateIdpDepartmentResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.departmentId)) {
    query['DepartmentId'] = request.departmentId;
  }
  if (!$isNull(request.departmentName)) {
    query['DepartmentName'] = request.departmentName;
  }
  if (!$isNull(request.idpConfigId)) {
    query['IdpConfigId'] = request.idpConfigId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateIdpDepartment',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改指定自定义身份源部门
 *
 * @param request UpdateIdpDepartmentRequest
 * @return UpdateIdpDepartmentResponse
 */
async function updateIdpDepartment(request: UpdateIdpDepartmentRequest): UpdateIdpDepartmentResponse {
  var runtime = new $RuntimeOptions{};
  return updateIdpDepartmentWithOptions(request, runtime);
}

model UpdateNacUserCertStatusRequest {
  idList?: [ 
    {
      devTag?: string(name='DevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      userId?: string(name='UserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
    }
  ](name='IdList'),
  status?: string(name='Status', example='Enabled'),
}

model UpdateNacUserCertStatusResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='successful'),
  requestId?: string(name='RequestId', example='102350E7-1A20-58F5-9D63-ABEA820AE6E1'),
}

model UpdateNacUserCertStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateNacUserCertStatusResponseBody(name='body'),
}

/**
 * @summary 更新NAC User 状态
 *
 * @param request UpdateNacUserCertStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateNacUserCertStatusResponse
 */
async function updateNacUserCertStatusWithOptions(request: UpdateNacUserCertStatusRequest, runtime: $RuntimeOptions): UpdateNacUserCertStatusResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.idList)) {
    bodyFlat['IdList'] = request.idList;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateNacUserCertStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新NAC User 状态
 *
 * @param request UpdateNacUserCertStatusRequest
 * @return UpdateNacUserCertStatusResponse
 */
async function updateNacUserCertStatus(request: UpdateNacUserCertStatusRequest): UpdateNacUserCertStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateNacUserCertStatusWithOptions(request, runtime);
}

model UpdatePrivateAccessApplicationRequest {
  addresses?: [ string ](name='Addresses'),
  applicationId?: string(name='ApplicationId', description='This parameter is required.', example='pa-application-e12860ef6c48****'),
  description?: string(name='Description', nullable=true),
  l7Config?: PAL7Config(name='L7Config'),
  l7ProxyDomainAutomaticPrefix?: string(name='L7ProxyDomainAutomaticPrefix'),
  l7ProxyDomainCustom?: string(name='L7ProxyDomainCustom'),
  l7ProxyDomainPrivate?: string(name='L7ProxyDomainPrivate', deprecated=true),
  modifyType?: string(name='ModifyType', example='Cover'),
  portRanges?: [ 
    {
      begin?: int32(name='Begin', example='80'),
      end?: int32(name='End', example='81'),
    }
  ](name='PortRanges'),
  protocol?: string(name='Protocol', example='All'),
  status?: string(name='Status', example='Enabled'),
  tagIds?: [ string ](name='TagIds', nullable=true),
}

model UpdatePrivateAccessApplicationShrinkRequest {
  addresses?: [ string ](name='Addresses'),
  applicationId?: string(name='ApplicationId', description='This parameter is required.', example='pa-application-e12860ef6c48****'),
  description?: string(name='Description', nullable=true),
  l7ConfigShrink?: string(name='L7Config'),
  l7ProxyDomainAutomaticPrefix?: string(name='L7ProxyDomainAutomaticPrefix'),
  l7ProxyDomainCustom?: string(name='L7ProxyDomainCustom'),
  l7ProxyDomainPrivate?: string(name='L7ProxyDomainPrivate', deprecated=true),
  modifyType?: string(name='ModifyType', example='Cover'),
  portRanges?: [ 
    {
      begin?: int32(name='Begin', example='80'),
      end?: int32(name='End', example='81'),
    }
  ](name='PortRanges'),
  protocol?: string(name='Protocol', example='All'),
  status?: string(name='Status', example='Enabled'),
  tagIds?: [ string ](name='TagIds', nullable=true),
}

model UpdatePrivateAccessApplicationResponseBody = {
  requestId?: string(name='RequestId', example='FD724DBC-CD76-5235-BF76-59C51B73296D'),
}

model UpdatePrivateAccessApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdatePrivateAccessApplicationResponseBody(name='body'),
}

/**
 * @summary 修改内网访问应用
 *
 * @param tmpReq UpdatePrivateAccessApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdatePrivateAccessApplicationResponse
 */
async function updatePrivateAccessApplicationWithOptions(tmpReq: UpdatePrivateAccessApplicationRequest, runtime: $RuntimeOptions): UpdatePrivateAccessApplicationResponse {
  tmpReq.validate();
  var request = new UpdatePrivateAccessApplicationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.l7Config)) {
    request.l7ConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.l7Config, 'L7Config', 'json');
  }
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.addresses)) {
    bodyFlat['Addresses'] = request.addresses;
  }
  if (!$isNull(request.applicationId)) {
    body['ApplicationId'] = request.applicationId;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.l7ConfigShrink)) {
    body['L7Config'] = request.l7ConfigShrink;
  }
  if (!$isNull(request.l7ProxyDomainAutomaticPrefix)) {
    body['L7ProxyDomainAutomaticPrefix'] = request.l7ProxyDomainAutomaticPrefix;
  }
  if (!$isNull(request.l7ProxyDomainCustom)) {
    body['L7ProxyDomainCustom'] = request.l7ProxyDomainCustom;
  }
  if (!$isNull(request.l7ProxyDomainPrivate)) {
    body['L7ProxyDomainPrivate'] = request.l7ProxyDomainPrivate;
  }
  if (!$isNull(request.modifyType)) {
    body['ModifyType'] = request.modifyType;
  }
  if (!$isNull(request.portRanges)) {
    bodyFlat['PortRanges'] = request.portRanges;
  }
  if (!$isNull(request.protocol)) {
    body['Protocol'] = request.protocol;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  if (!$isNull(request.tagIds)) {
    bodyFlat['TagIds'] = request.tagIds;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdatePrivateAccessApplication',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改内网访问应用
 *
 * @param request UpdatePrivateAccessApplicationRequest
 * @return UpdatePrivateAccessApplicationResponse
 */
async function updatePrivateAccessApplication(request: UpdatePrivateAccessApplicationRequest): UpdatePrivateAccessApplicationResponse {
  var runtime = new $RuntimeOptions{};
  return updatePrivateAccessApplicationWithOptions(request, runtime);
}

model UpdatePrivateAccessPolicyRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  applicationType?: string(name='ApplicationType', example='Application'),
  customUserAttributes?: [ 
    {
      idpId?: int32(name='IdpId', example='12'),
      relation?: string(name='Relation', description='This parameter is required.', example='Equal'),
      userGroupType?: string(name='UserGroupType', description='This parameter is required.', example='department'),
      value?: string(name='Value', description='This parameter is required.'),
    }
  ](name='CustomUserAttributes'),
  description?: string(name='Description', nullable=true),
  deviceAttributeAction?: string(name='DeviceAttributeAction'),
  deviceAttributeId?: string(name='DeviceAttributeId'),
  modifyType?: string(name='ModifyType', example='Cover'),
  policyAction?: string(name='PolicyAction', example='Allow'),
  policyId?: string(name='PolicyId', description='This parameter is required.', example='pa-policy-63b2f1844b86****'),
  priority?: int32(name='Priority', example='1'),
  status?: string(name='Status', example='Enabled'),
  tagIds?: [ string ](name='TagIds', description='内网访问标签ID集合。一条策略最多支持100个内网访问标签ID。'),
  triggerTemplateId?: string(name='TriggerTemplateId'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  userGroupMode?: string(name='UserGroupMode', description='内网访问策略的用户组类型。取值：
- **Normal**：普通用户组。
- **Custom**：自定义用户组。', example='Normal'),
}

model UpdatePrivateAccessPolicyResponseBody = {
  requestId?: string(name='RequestId', example='5FEF5CFA-14CC-5DE5-BD1F-AFFE0996E71D'),
}

model UpdatePrivateAccessPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdatePrivateAccessPolicyResponseBody(name='body'),
}

/**
 * @summary 修改内网访问策略
 *
 * @param request UpdatePrivateAccessPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdatePrivateAccessPolicyResponse
 */
async function updatePrivateAccessPolicyWithOptions(request: UpdatePrivateAccessPolicyRequest, runtime: $RuntimeOptions): UpdatePrivateAccessPolicyResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.applicationIds)) {
    bodyFlat['ApplicationIds'] = request.applicationIds;
  }
  if (!$isNull(request.applicationType)) {
    body['ApplicationType'] = request.applicationType;
  }
  if (!$isNull(request.customUserAttributes)) {
    bodyFlat['CustomUserAttributes'] = request.customUserAttributes;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.deviceAttributeAction)) {
    body['DeviceAttributeAction'] = request.deviceAttributeAction;
  }
  if (!$isNull(request.deviceAttributeId)) {
    body['DeviceAttributeId'] = request.deviceAttributeId;
  }
  if (!$isNull(request.modifyType)) {
    body['ModifyType'] = request.modifyType;
  }
  if (!$isNull(request.policyAction)) {
    body['PolicyAction'] = request.policyAction;
  }
  if (!$isNull(request.policyId)) {
    body['PolicyId'] = request.policyId;
  }
  if (!$isNull(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  if (!$isNull(request.tagIds)) {
    bodyFlat['TagIds'] = request.tagIds;
  }
  if (!$isNull(request.triggerTemplateId)) {
    body['TriggerTemplateId'] = request.triggerTemplateId;
  }
  if (!$isNull(request.userGroupIds)) {
    bodyFlat['UserGroupIds'] = request.userGroupIds;
  }
  if (!$isNull(request.userGroupMode)) {
    body['UserGroupMode'] = request.userGroupMode;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdatePrivateAccessPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改内网访问策略
 *
 * @param request UpdatePrivateAccessPolicyRequest
 * @return UpdatePrivateAccessPolicyResponse
 */
async function updatePrivateAccessPolicy(request: UpdatePrivateAccessPolicyRequest): UpdatePrivateAccessPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return updatePrivateAccessPolicyWithOptions(request, runtime);
}

model UpdateRegistrationPolicyRequest {
  companyLimitCount?: {
    all?: int32(name='All', example='1'),
    mobile?: int32(name='Mobile', example='0'),
    PC?: int32(name='PC', example='0'),
  }(name='CompanyLimitCount'),
  companyLimitType?: string(name='CompanyLimitType', example='LimitAll'),
  description?: string(name='Description'),
  matchMode?: string(name='MatchMode', example='UserGroupNormal'),
  name?: string(name='Name', example='registration_policy_name'),
  personalLimitCount?: {
    all?: int32(name='All', example='0'),
    mobile?: int32(name='Mobile', example='1'),
    PC?: int32(name='PC', example='2'),
  }(name='PersonalLimitCount'),
  personalLimitType?: string(name='PersonalLimitType', example='LimitDiff'),
  policyId?: string(name='PolicyId', description='This parameter is required.', example='reg-policy-63b2f1844b86****'),
  priority?: long(name='Priority', example='0'),
  status?: string(name='Status', example='Enabled'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelist?: [ string ](name='Whitelist'),
}

model UpdateRegistrationPolicyShrinkRequest {
  companyLimitCountShrink?: string(name='CompanyLimitCount'),
  companyLimitType?: string(name='CompanyLimitType', example='LimitAll'),
  description?: string(name='Description'),
  matchMode?: string(name='MatchMode', example='UserGroupNormal'),
  name?: string(name='Name', example='registration_policy_name'),
  personalLimitCountShrink?: string(name='PersonalLimitCount'),
  personalLimitType?: string(name='PersonalLimitType', example='LimitDiff'),
  policyId?: string(name='PolicyId', description='This parameter is required.', example='reg-policy-63b2f1844b86****'),
  priority?: long(name='Priority', example='0'),
  status?: string(name='Status', example='Enabled'),
  userGroupIds?: [ string ](name='UserGroupIds'),
  whitelist?: [ string ](name='Whitelist'),
}

model UpdateRegistrationPolicyResponseBody = {
  policy?: {
    createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
    description?: string(name='Description'),
    limitDetail?: [ 
      {
        deviceBelong?: string(name='DeviceBelong', example='Company'),
        limitCount?: {
          all?: int32(name='All', example='1'),
          mobile?: int32(name='Mobile', example='0'),
          PC?: int32(name='PC', example='0'),
        }(name='LimitCount'),
        limitType?: string(name='LimitType', example='LimitAll'),
      }
    ](name='LimitDetail'),
    matchMode?: string(name='MatchMode', example='UserGroupNormal'),
    name?: string(name='Name', example='registration_policy_name'),
    policyId?: string(name='PolicyId'),
    priority?: string(name='Priority', example='1'),
    status?: string(name='Status', example='Enabled'),
    userGroupIds?: [ string ](name='UserGroupIds'),
    whitelist?: [ string ](name='Whitelist'),
  }(name='Policy'),
  requestId?: string(name='RequestId', example='27064ECA-0936-59F3-8A98-EC821E5BD08F'),
}

model UpdateRegistrationPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRegistrationPolicyResponseBody(name='body'),
}

/**
 * @summary 修改设备注册策略
 *
 * @param tmpReq UpdateRegistrationPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRegistrationPolicyResponse
 */
async function updateRegistrationPolicyWithOptions(tmpReq: UpdateRegistrationPolicyRequest, runtime: $RuntimeOptions): UpdateRegistrationPolicyResponse {
  tmpReq.validate();
  var request = new UpdateRegistrationPolicyShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.companyLimitCount)) {
    request.companyLimitCountShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.companyLimitCount, 'CompanyLimitCount', 'json');
  }
  if (!$isNull(tmpReq.personalLimitCount)) {
    request.personalLimitCountShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.personalLimitCount, 'PersonalLimitCount', 'json');
  }
  var body : map[string]any = {};
  if (!$isNull(request.companyLimitCountShrink)) {
    body['CompanyLimitCount'] = request.companyLimitCountShrink;
  }
  if (!$isNull(request.companyLimitType)) {
    body['CompanyLimitType'] = request.companyLimitType;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.matchMode)) {
    body['MatchMode'] = request.matchMode;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.personalLimitCountShrink)) {
    body['PersonalLimitCount'] = request.personalLimitCountShrink;
  }
  if (!$isNull(request.personalLimitType)) {
    body['PersonalLimitType'] = request.personalLimitType;
  }
  if (!$isNull(request.policyId)) {
    body['PolicyId'] = request.policyId;
  }
  if (!$isNull(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.userGroupIds)) {
    bodyFlat['UserGroupIds'] = request.userGroupIds;
  }
  if (!$isNull(request.whitelist)) {
    bodyFlat['Whitelist'] = request.whitelist;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateRegistrationPolicy',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改设备注册策略
 *
 * @param request UpdateRegistrationPolicyRequest
 * @return UpdateRegistrationPolicyResponse
 */
async function updateRegistrationPolicy(request: UpdateRegistrationPolicyRequest): UpdateRegistrationPolicyResponse {
  var runtime = new $RuntimeOptions{};
  return updateRegistrationPolicyWithOptions(request, runtime);
}

model UpdateUninstallApplicationsStatusRequest {
  applicationIds?: [ string ](name='ApplicationIds'),
  status?: string(name='Status', example='Approved'),
}

model UpdateUninstallApplicationsStatusResponseBody = {
  applications?: [ 
    {
      applicationId?: string(name='ApplicationId', example='uninstall-app-6646831ac314****'),
      createTime?: string(name='CreateTime', example='2023-07-17 18:46:55'),
      department?: string(name='Department'),
      devTag?: string(name='DevTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      devType?: string(name='DevType', example='Windows'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      idpName?: string(name='IdpName'),
      isUninstall?: boolean(name='IsUninstall', example='false'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      reason?: string(name='Reason'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      status?: string(name='Status', example='Approved'),
      username?: string(name='Username'),
    }
  ](name='Applications'),
  requestId?: string(name='RequestId', example='9B769522-D50C-5978-8981-52BE800D6099'),
}

model UpdateUninstallApplicationsStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUninstallApplicationsStatusResponseBody(name='body'),
}

/**
 * @summary 批量修改卸载申请状态
 *
 * @param request UpdateUninstallApplicationsStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUninstallApplicationsStatusResponse
 */
async function updateUninstallApplicationsStatusWithOptions(request: UpdateUninstallApplicationsStatusRequest, runtime: $RuntimeOptions): UpdateUninstallApplicationsStatusResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.applicationIds)) {
    bodyFlat['ApplicationIds'] = request.applicationIds;
  }
  if (!$isNull(request.status)) {
    body['Status'] = request.status;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUninstallApplicationsStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量修改卸载申请状态
 *
 * @param request UpdateUninstallApplicationsStatusRequest
 * @return UpdateUninstallApplicationsStatusResponse
 */
async function updateUninstallApplicationsStatus(request: UpdateUninstallApplicationsStatusRequest): UpdateUninstallApplicationsStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateUninstallApplicationsStatusWithOptions(request, runtime);
}

model UpdateUserDevicesSharingStatusRequest {
  deviceTags?: [ string ](name='DeviceTags', description='This parameter is required.'),
  sharingStatus?: boolean(name='SharingStatus', description='This parameter is required.', example='true'),
}

model UpdateUserDevicesSharingStatusResponseBody = {
  devices?: [ 
    {
      appStatus?: string(name='AppStatus', example='Online'),
      appVersion?: string(name='AppVersion', example='2.2.0'),
      CPU?: string(name='CPU', example='Apple M1'),
      createTime?: string(name='CreateTime', example='2023-05-16 17:18:46'),
      department?: string(name='Department'),
      deviceBelong?: string(name='DeviceBelong', example='Company'),
      deviceModel?: string(name='DeviceModel', example='MacBookPro17,1'),
      deviceStatus?: string(name='DeviceStatus', example='Online'),
      deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      deviceType?: string(name='DeviceType', example='Windows'),
      deviceVersion?: string(name='DeviceVersion', example='3.5.1'),
      disk?: string(name='Disk', example='APPLE SSD AP0512Q Media'),
      dlpStatus?: string(name='DlpStatus', example='Enabled'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      iaStatus?: string(name='IaStatus', example='Enabled'),
      innerIP?: string(name='InnerIP', example='192.168.XX.XX'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      memory?: string(name='Memory', example='16'),
      nacStatus?: string(name='NacStatus', example='Enabled'),
      netInterfaceInfo?: [ 
        {
          mac?: string(name='Mac'),
          name?: string(name='Name'),
        }
      ](name='NetInterfaceInfo'),
      paStatus?: string(name='PaStatus', example='Enabled'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      sharingStatus?: boolean(name='SharingStatus', example='true'),
      srcIP?: string(name='SrcIP', example='11.49.XX.XX'),
      updateTime?: string(name='UpdateTime', example='2023-08-24 19:04:42'),
      username?: string(name='Username'),
    }
  ](name='Devices'),
  requestId?: string(name='RequestId', example='4D169859-A4F2-5EC8-853B-8447787C0D8A'),
}

model UpdateUserDevicesSharingStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserDevicesSharingStatusResponseBody(name='body'),
}

/**
 * @summary 批量更新用户设备共享状态
 *
 * @param request UpdateUserDevicesSharingStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserDevicesSharingStatusResponse
 */
async function updateUserDevicesSharingStatusWithOptions(request: UpdateUserDevicesSharingStatusRequest, runtime: $RuntimeOptions): UpdateUserDevicesSharingStatusResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.deviceTags)) {
    bodyFlat['DeviceTags'] = request.deviceTags;
  }
  if (!$isNull(request.sharingStatus)) {
    body['SharingStatus'] = request.sharingStatus;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUserDevicesSharingStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量更新用户设备共享状态
 *
 * @param request UpdateUserDevicesSharingStatusRequest
 * @return UpdateUserDevicesSharingStatusResponse
 */
async function updateUserDevicesSharingStatus(request: UpdateUserDevicesSharingStatusRequest): UpdateUserDevicesSharingStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateUserDevicesSharingStatusWithOptions(request, runtime);
}

model UpdateUserDevicesStatusRequest {
  deviceAction?: string(name='DeviceAction', description='This parameter is required.', example='Unbound'),
  deviceTags?: [ string ](name='DeviceTags', description='This parameter is required.'),
}

model UpdateUserDevicesStatusResponseBody = {
  devices?: [ 
    {
      appStatus?: string(name='AppStatus', example='Online'),
      appVersion?: string(name='AppVersion', example='2.2.0'),
      CPU?: string(name='CPU', example='Apple M1'),
      createTime?: string(name='CreateTime', example='2023-07-17 18:46:55'),
      department?: string(name='Department'),
      deviceBelong?: string(name='DeviceBelong', example='Company'),
      deviceModel?: string(name='DeviceModel', example='MacBookPro17,1'),
      deviceStatus?: string(name='DeviceStatus', example='Online'),
      deviceTag?: string(name='DeviceTag', example='36efa42d-2c32-c4dc-e3fc-8541e33a****'),
      deviceType?: string(name='DeviceType', example='Windows'),
      deviceVersion?: string(name='DeviceVersion', example='3.5.1'),
      disk?: string(name='Disk', example='APPLE SSD AP0512Q Media'),
      dlpStatus?: string(name='DlpStatus', example='Enabled'),
      hostname?: string(name='Hostname', example='win10-64bit'),
      iaStatus?: string(name='IaStatus', example='Enabled'),
      innerIP?: string(name='InnerIP', example='192.168.XX.XX'),
      mac?: string(name='Mac', example='00:16:XX:XX:7c:46'),
      memory?: string(name='Memory', example='16'),
      nacStatus?: string(name='NacStatus', example='Enabled'),
      netInterfaceInfo?: [ 
        {
          mac?: string(name='Mac'),
          name?: string(name='Name'),
        }
      ](name='NetInterfaceInfo'),
      paStatus?: string(name='PaStatus', example='Enabled'),
      saseUserId?: string(name='SaseUserId', example='su_e8f218fb171edd167c2ad917d21f53148bdefc510ca1f3c3cc0249d3643d****'),
      sharingStatus?: boolean(name='SharingStatus', example='true'),
      srcIP?: string(name='SrcIP', example='11.49.XX.XX'),
      updateTime?: string(name='UpdateTime', example='2023-08-24 19:04:42'),
      username?: string(name='Username'),
    }
  ](name='Devices'),
  requestId?: string(name='RequestId', example='5FEF5CFA-14CC-5DE5-BD1F-AFFE0996E71D'),
}

model UpdateUserDevicesStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserDevicesStatusResponseBody(name='body'),
}

/**
 * @summary 批量更新用户设备状态
 *
 * @param request UpdateUserDevicesStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserDevicesStatusResponse
 */
async function updateUserDevicesStatusWithOptions(request: UpdateUserDevicesStatusRequest, runtime: $RuntimeOptions): UpdateUserDevicesStatusResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.deviceAction)) {
    body['DeviceAction'] = request.deviceAction;
  }
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.deviceTags)) {
    bodyFlat['DeviceTags'] = request.deviceTags;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUserDevicesStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量更新用户设备状态
 *
 * @param request UpdateUserDevicesStatusRequest
 * @return UpdateUserDevicesStatusResponse
 */
async function updateUserDevicesStatus(request: UpdateUserDevicesStatusRequest): UpdateUserDevicesStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateUserDevicesStatusWithOptions(request, runtime);
}

model UpdateUserGroupRequest {
  attributes?: [ 
    {
      idpId?: int32(name='IdpId', example='12'),
      relation?: string(name='Relation', description='This parameter is required.', example='Equal'),
      userGroupType?: string(name='UserGroupType', description='This parameter is required.', example='department'),
      value?: string(name='Value', description='This parameter is required.'),
    }
  ](name='Attributes'),
  description?: string(name='Description', nullable=true),
  modifyType?: string(name='ModifyType', example='Cover'),
  userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='usergroup-6f1ef2fc56b6****'),
}

model UpdateUserGroupResponseBody = {
  requestId?: string(name='RequestId', example='FD724DBC-CD76-5235-BF76-59C51B73296D'),
}

model UpdateUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserGroupResponseBody(name='body'),
}

/**
 * @summary 修改用户组
 *
 * @param request UpdateUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserGroupResponse
 */
async function updateUserGroupWithOptions(request: UpdateUserGroupRequest, runtime: $RuntimeOptions): UpdateUserGroupResponse {
  request.validate();
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.attributes)) {
    bodyFlat['Attributes'] = request.attributes;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.modifyType)) {
    body['ModifyType'] = request.modifyType;
  }
  if (!$isNull(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUserGroup',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改用户组
 *
 * @param request UpdateUserGroupRequest
 * @return UpdateUserGroupResponse
 */
async function updateUserGroup(request: UpdateUserGroupRequest): UpdateUserGroupResponse {
  var runtime = new $RuntimeOptions{};
  return updateUserGroupWithOptions(request, runtime);
}

model UpdateUsersStatusRequest {
  saseUserIds?: [ string ](name='SaseUserIds', description='This parameter is required.'),
  status?: string(name='Status', description='This parameter is required.', example='Enabled'),
}

model UpdateUsersStatusResponseBody = {
  requestId?: string(name='RequestId', example='47363C2B-1AAA-5954-8847-0E50FCC54117'),
}

model UpdateUsersStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUsersStatusResponseBody(name='body'),
}

/**
 * @summary 批量修改登陆用户状态
 *
 * @param request UpdateUsersStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUsersStatusResponse
 */
async function updateUsersStatusWithOptions(request: UpdateUsersStatusRequest, runtime: $RuntimeOptions): UpdateUsersStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.saseUserIds)) {
    query['SaseUserIds'] = request.saseUserIds;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateUsersStatus',
    version = '2023-01-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量修改登陆用户状态
 *
 * @param request UpdateUsersStatusRequest
 * @return UpdateUsersStatusResponse
 */
async function updateUsersStatus(request: UpdateUsersStatusRequest): UpdateUsersStatusResponse {
  var runtime = new $RuntimeOptions{};
  return updateUsersStatusWithOptions(request, runtime);
}

